mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-05 12:24:42 +01:00
V10.8.20: SCL > KEY (the owner): the scale's whole name large (D MAJOR, A DORIAN; M or short if it does not fit), its notes as chips in their colours from ROOT (ROOT framed), the octave of keys lit with each note's degree; SCL > CHORD as JIANT BYTE's (GPL, as BYTE has it): the last key's chord named from the notes it plays (chord_peek: CHORD and VOICING), TYPE . VOICING, two octaves of keys lit with each note's interval (R -3 3 5 -7 ..: no lowercase, a flat '-'), the seven degrees as tags with their chords' short names; a drum track or a voice not POLY says why it plays one note; ENV layers v2 (BYTE's): the trail from the start, warm near cold far, each stage's value by its tag (the LARGE strip: the tags only); SEQ > STRETCH (STRETCH REPEAT NUDGE ROTATE) and MUTATE (its page, the bar's mutations) gone for the flash (the owner), the pages kept in the table, their settings in the projects read by nothing (1808 B of RAM free, kept free); the splash's version and "by Juan Jiant" from its first frame, the emulator's first calls (below 0) no longer its last picture; tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
14 files changed
+2446
-2802
No files matched your search
@@ -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.19" /* (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.20" /* (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"
|
||||
|
||||
@@ -282,7 +282,6 @@ static uint32_t page_icon(const page_t *pg)
|
||||
case GR_GCOMP: return ICON_ARP; /* (0.9.9-seq2f) GLO > COMPS: the global ones */
|
||||
case GR_EUCLID: return ICON_PROB; /* (V10.6) EUCLID (was MUTATE) */
|
||||
case GR_FUGUE: return ICON_X_PATTERN; /* (0.6.52) FUGUE */
|
||||
case GR_SHAPE: return ICON_X_REPEAT; /* (0.6.85) STRETCH */
|
||||
case GR_MORPH: return ICON_LFO_WAVE;
|
||||
case GR_DXIMG: return ICON_MIX; /* (0.6.45) MORPH */
|
||||
case GR_MOTION: return motion_icon();
|
||||
|
||||
+3
-8
@@ -618,7 +618,9 @@ static int page_visible(uint32_t i)
|
||||
{
|
||||
if (PAGES[i].graph == GR_SONG && (PAGES[i].fam == FAM_SEQ || (PAGES[i].title[0] == 'T' && PAGES[i].title[1] == 'I')))
|
||||
return 0; /* (V10.8: TIMELINE, PARTS gone, the song mode's redesign) */
|
||||
if (PAGES[i].graph == GR_LIVE)
|
||||
if (PAGES[i].graph == GR_LIVE || PAGES[i].graph == GR_SHAPE || PAGES[i].id[0] == ID_MU0) /* (V10.8.20, the owner: SEQ >
|
||||
* STRETCH and MUTATE gone for the flash; kept in the table: their
|
||||
* index; ROTATE's P_SOFS, MUTATE's settings kept in the projects) */
|
||||
return 0; /* (V10.8.3, the owner: GLO > LIVE gone for the song mode's flash) */ /* (0.6.24) the song in one place: SAVE > ARRANGE (SEQ > SONG
|
||||
* was the same page twice; kept in the table: its index) */
|
||||
if (sys_load == LOAD_ECO && ((PAGES[i].graph == GR_SLCR || PAGES[i].graph == GR_SLPIT) ||
|
||||
@@ -878,8 +880,6 @@ static uint32_t lock_id(uint32_t k)
|
||||
|
||||
static void ev_enter(void);
|
||||
static uint8_t br_armed;
|
||||
static uint8_t ndg_step; /* (V10.25) SEQ > STRETCH's NUDGE: 0 the sequence by steps (blue), 1 the
|
||||
* cursor step's MICRO timing (red); OCT- / OCT+ pick it */
|
||||
static uint32_t tl_t0; /* (V10.24) TOOLS: OCT+ held since (0: not), its action and track */
|
||||
static uint8_t tl_kind, tl_trk;
|
||||
#define TL_HOLD 900u /* (ms: held this long, it is done; no dialog) */
|
||||
@@ -2147,11 +2147,6 @@ static uint32_t act_cols(void) /* the columns that are actions
|
||||
}
|
||||
|
||||
/* the action OCT+ does: its column + 1, 0 = none picked yet (PATTERNS has LOAD only) */
|
||||
/* (0.6.85) SEQ > STRETCH's picks (ui_input.c shape_knob); (0.6.92) done as the knob turns, from a neutral middle:
|
||||
* STRETCH /8 .. /2 (0..6), x1 (7: as it was), x2 .. x8 (8..14); REPEAT OFF (0), x2 .. x8 (1..7), TO 64 (8) */
|
||||
static uint8_t shp_i = 7u, shp_r = 0u;
|
||||
static int32_t shp_k(void) { return shp_i < 7u ? -(int32_t)(8u - shp_i) : shp_i == 7u ? 1 : (int32_t)shp_i - 6; }
|
||||
static uint32_t shp_rep(void) { return shp_r == 0u ? 1u : shp_r < 8u ? shp_r + 1u : 0u; } /* 1 as it was, 2..8, 0 to 64 */
|
||||
|
||||
static uint32_t act_col(void)
|
||||
{
|
||||
|
||||
+17
-34
@@ -1414,31 +1414,6 @@ static void draw_columns(void)
|
||||
text_column(3, "SCENE", used && song_idx.scene[song_cur][row].on ? "ON" : "--", used && song_idx.scene[song_cur][row].on ? VAL(3u) : T_DIM); /* (JIANT) */
|
||||
return;
|
||||
}
|
||||
if (cur_page()->graph == GR_SHAPE) { /* (0.6.85) STRETCH REPEAT NUDGE; (0.6.92) ROTATE, done on the turn */
|
||||
int32_t k = shp_k(), r = (int32_t)shp_rep(), ofs = TSEL->p[P_SOFS];
|
||||
val[0] = k > 0 ? 'x' : '/';
|
||||
fmt_int(val + 1, k > 0 ? k : -k);
|
||||
gauge_column(0, "STRETCH", val, k != 1 ? VAL(0u) : T_DIM, (int32_t)shp_i * 1000 / 14);
|
||||
if (r == 1) str_cpy(val, "OFF", sizeof val);
|
||||
else if (r) { val[0] = 'x'; fmt_int(val + 1, r); }
|
||||
else str_cpy(val, "TO 64", sizeof val);
|
||||
gauge_column(1, "REPEAT", val, r != 1 ? VAL(1u) : T_DIM, (int32_t)shp_r * 1000 / 8);
|
||||
if (ndg_step == 2u) { /* (V10.7.4) the cursor step moved by steps */
|
||||
val[0] = 'S'; fmt_int(val + 1, (int32_t)(ui.cursor % NSTEP) + 1);
|
||||
text_column(2, "NUDGE", val, T_REC);
|
||||
} else if (ndg_step) { /* (V10.25) red: the cursor step's MICRO (64ths) */
|
||||
int32_t m = ST_MICRO(&TSEL->step[ui.cursor % NSTEP]);
|
||||
val[0] = m > 0 ? '+' : 0;
|
||||
fmt_int(val + (m > 0), m);
|
||||
text_column(2, "NUDGE", val, T_REC);
|
||||
} else
|
||||
text_column(2, "NUDGE", "< >", T_THEME); /* blue: the whole sequence by steps */
|
||||
val[0] = ofs > 0 ? '+' : 0;
|
||||
fmt_int(val + (ofs > 0), ofs);
|
||||
card_mot_of(&TSEL->p[P_SOFS]);
|
||||
draw_column(3, "ROTATE", val, "ST", ofs ? VAL(3u) : T_DIM, (ofs + 32) * 1000 / 64, ICON_ORDER);
|
||||
return;
|
||||
}
|
||||
if (cur_page()->graph == GR_FUGUE) { /* (0.6.52) HEAD RATE DIR INTERVAL */
|
||||
const fg_set_t *f = &fg_set[song.sel % NTRK][fg_ui % FG_HEADS];
|
||||
fmt_int(val, (int32_t)(fg_ui % FG_HEADS) + 2);
|
||||
@@ -1833,8 +1808,8 @@ static void draw_columns(void)
|
||||
* ui_signature.h, tools/gen_logo.py: a point every ~3 px, bit 7 of y a stroke's start). (V10.8.18, the owner's pick
|
||||
* "Seis hilos") 0 .. SPL_IN ms: the six tracks' threads (TRK_COL) come in from the screen's edges, curving, easing out,
|
||||
* onto the logo's first point; then the logo writes itself in the thermal scale (SPL_LOGO ms, the pen's tip white),
|
||||
* a white flash at its start fading (300 ms); then six dots in the tracks' colours one by one under it and the version
|
||||
* and "by Juan Jiant" fading in. MENU > ANIM OFF: the last picture at once. The strokes are drawn smooth: each a
|
||||
* a white flash at its start fading (300 ms); then six dots in the tracks' colours one by one under it; the version and
|
||||
* "by Juan Jiant" under them from the first frame (V10.8.20). MENU > ANIM OFF: the last picture at once. The strokes are drawn smooth: each a
|
||||
* line through its points, an antialiased round pen ~4 px wide stamped along it a pixel apart (spl_seg, spl_disc:
|
||||
* the joins round; nothing new stored: the same points). In the saved palette (settings_init before it) */
|
||||
#include "ui_signature.h"
|
||||
@@ -1859,6 +1834,13 @@ static __attribute__((noinline)) void spl_disc(int32_t cx, int32_t cy, int32_t r
|
||||
og_plot(x, y, c, k * a >> 8);
|
||||
}
|
||||
}
|
||||
/* (V10.8.20, the owner: the version always seen) the version and "by Juan Jiant" at canvas y, from the first frame */
|
||||
static __attribute__((noinline)) void spl_lines(int32_t y)
|
||||
{
|
||||
uint32_t k;
|
||||
for (k = 0; k < 2u; k++)
|
||||
cv_text_in(0, y + (int32_t)k * 16, 240, &AF_S, SPLASH_LINES[k], k ? T_DIM : T_MID, T_BG);
|
||||
}
|
||||
/* the round pen from (x0, y0) to (x1, y1) (Q4), a stamp a pixel (the joins round) */
|
||||
static __attribute__((noinline)) void spl_seg(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t r, uint16_t c)
|
||||
{
|
||||
@@ -1887,13 +1869,15 @@ BTAPP_FN static void spl_threads(uint32_t ms)
|
||||
}
|
||||
}
|
||||
cv_oy = 0;
|
||||
if (j)
|
||||
spl_lines(SPL_TY - 120);
|
||||
cv_blit(0, (uint32_t)(120 * j));
|
||||
}
|
||||
}
|
||||
/* the splash at ms (>= SPL_WRITE: whole) */
|
||||
static void splash_at(uint32_t ms)
|
||||
{
|
||||
int32_t i, k, j, x0 = 0, y0 = 0, sx = 34 * 16, sy = (SPL_SY + 6 + 101) * 16;
|
||||
int32_t i, k, x0 = 0, y0 = 0, sx = 34 * 16, sy = (SPL_SY + 6 + 101) * 16;
|
||||
if (ms < SPL_IN) {
|
||||
if (bt_hw_seg())
|
||||
spl_threads(ms);
|
||||
@@ -1922,9 +1906,7 @@ static void splash_at(uint32_t ms)
|
||||
cv_begin(240, 52, T_BG); /* the six dots, the lines */
|
||||
for (k = 0; k < 6; k++)
|
||||
spl_disc((70 + 20 * k) * 16 + 8, 8 * 16 + 8, clamp((int32_t)ms - 700 - k * 60, 0, 200) * 48 / 200, TRK_COL[k], 256);
|
||||
j = clamp((int32_t)ms - 900, 0, 300) / 3;
|
||||
for (k = 0; j && k < 2; k++)
|
||||
cv_text_in(0, SPL_TY - 180 + k * 16, 240, &AF_S, SPLASH_LINES[k], ux_mix(T_BG, k ? T_DIM : T_MID, j), T_BG);
|
||||
spl_lines(SPL_TY - 180);
|
||||
cv_blit(0, 180);
|
||||
}
|
||||
static void draw_splash(void)
|
||||
@@ -1936,10 +1918,11 @@ static void draw_splash(void)
|
||||
/* main.c's splash loop: the splash ms after the start */
|
||||
static void splash_write(uint32_t ms)
|
||||
{
|
||||
static uint8_t done;
|
||||
if (!spl_anim || (ui_prefs & PREF_ANIM_OFF) || done)
|
||||
if (!spl_anim || (ui_prefs & PREF_ANIM_OFF))
|
||||
return;
|
||||
done = ms >= SPL_WRITE; /* (the last picture once) */
|
||||
if ((int32_t)ms < 0) /* (V10.8.20: the emulator's first 30 ms came in below 0, as the
|
||||
* end: its last picture, without the lines, and no more) */
|
||||
ms = 0;
|
||||
splash_at(ms);
|
||||
lcd_sync();
|
||||
}
|
||||
|
||||
+4
-117
@@ -30,8 +30,6 @@ static uint32_t eu_s, eu_ms;
|
||||
enum { EK_HITS, EK_STEPS, EK_ROT, EK_K4, EK_M0, EK_U0 = EK_M0 + EU_M, EK_N = EK_U0 + 4 };
|
||||
static const uint8_t EU_MX[4] = {5, 100, 2, 3}; /* (V10.16) MUTATE's settings' tops */
|
||||
static uint16_t eu_zs[NTRK]; /* (V10.24) the anchor's seed (OCT- returns to it too) */
|
||||
static uint8_t eu_za[NTRK][64] __attribute__((section(".pool"))); /* (V10.24) the anchor's steps as generated (a kit: the
|
||||
* lanes' bits; a melody: the first note, 0 none), MUTATE's picture */
|
||||
/* (V10.28) the sequence the track had (recorded, edited, a song's) when EUCLID came to it: a kit's lanes step by step;
|
||||
* a melody's first note of each step (bit 7: a chord), 1 a held step, 0 none. EUCLID transforms it: its rhythm until
|
||||
* HITS STEPS or ROTATE are turned, its notes always */
|
||||
@@ -448,10 +446,6 @@ static void eu_gen(uint32_t k, uint32_t hand)
|
||||
load_end(t);
|
||||
pat_sig[k % NTRK] = ~steps_sig(t); /* (the user's steps now) */
|
||||
e->sg = steps_sig(t); /* (V10.28: its own, not taken again) */
|
||||
if (e->seed == eu_zs[k % NTRK] && !memcmp((uint8_t *)e + EU_Z0, eu_z[k % NTRK], EU_ZN)) { /* (V10.24) the anchor's */
|
||||
uint32_t i;
|
||||
for (i = 0; i < 64u; i++) eu_za[k % NTRK][i] = (uint8_t)eu_val(t, &t->step[i]);
|
||||
}
|
||||
ui.force = 1;
|
||||
}
|
||||
|
||||
@@ -524,67 +518,14 @@ static void eu_put(uint32_t k, int32_t v)
|
||||
eu_gen(song.sel, 1);
|
||||
}
|
||||
|
||||
/* (V10.16) MUTATE: track k's settings moved by AMOUNT (from the anchor: ORBIT; from where they are: DRIFT; PULSE: the
|
||||
* anchor and a mutation by turns): always a new seed (GROOVE: where the hits fall, the notes), RHYTHM HITS (DENSITY)
|
||||
* and ROTATE, FEEL the four MODES and VARY; a lane picked: that lane's, the others as they are */
|
||||
static void eu_mutate(uint32_t k, eu_t *e)
|
||||
{
|
||||
uint32_t p = e->mu[1], w = e->mu[3], dr = drum_track(&trk[k]) != 0, sl = e->lane % (NLANE + 1u), i, al = dr && !sl;
|
||||
eul_t *L = al ? &e->a : &e->l[dr ? sl - 1u : 0u];
|
||||
int32_t d = (int32_t)(1u + p / 40u);
|
||||
mut_n[k % NTRK]++; /* (V10.6z3) the editor's MUTATE push (editor.c) */
|
||||
if (e->mu[2] != 1u) memcpy((uint8_t *)e + EU_Z0, eu_z[k], EU_ZN);
|
||||
if (e->mu[2] == 2u && (e->flip ^= 1u) == 0u) { e->seed = eu_zs[k]; e->xm = 0; eu_gen(k, 0); return; } /* (PULSE: the anchor's turn) */
|
||||
eu_s ^= fm1_ms * 2654435761u + k + mut_n[k % NTRK] * 0x9E3779B9u; /* (V10.7.66: each mutation its own) */
|
||||
if (dr) e->seed = (uint16_t)(eu_rnd() | 1u);
|
||||
else { /* (V10.7.66, the owner) a melody: the anchor's notes crossed with
|
||||
* a new seed's, note by note (four to twelve of sixteen new) */
|
||||
do e->s2 = (uint16_t)(eu_rnd() | 1u); while (__builtin_popcount((uint32_t)(e->s2 ^ e->seed)) < 6); /* (V10.7.67: far) */
|
||||
do e->xm = (uint16_t)eu_rnd(); while (__builtin_popcount(e->xm) < 4 || __builtin_popcount(e->xm) > 12);
|
||||
}
|
||||
if ((w == 1u || w == 3u) && L->n) { /* RHYTHM */
|
||||
if (eu_ch(p)) L->h = (uint8_t)clamp((int32_t)L->h + (eu_ch(50) ? d : -d), al || !dr ? 1 : 0, al ? 8 : L->n);
|
||||
if (eu_ch(p)) L->r = (uint8_t)((L->r + eu_rnd() % (1u + p * L->n / 200u)) % L->n);
|
||||
if (al) eu_kit(e);
|
||||
e->rs &= (uint16_t)(al ? 0u : ~(1u << (dr ? sl - 1u : 0u)));
|
||||
}
|
||||
if (w >= 2u) { /* FEEL */
|
||||
static const uint8_t MX[2][EU_M] = {{6, 15, 4, 0}, {100, 100, 100, 100}}; /* (a melody's CONTOUR RANGE MOTIF) */
|
||||
for (i = 0; i <= EU_M; i++) {
|
||||
uint8_t *m = i < EU_M ? &e->m[i] : &e->vary;
|
||||
int32_t top = i < EU_M ? MX[dr][i] : 100, st = i < EU_M && !dr && i < 3u ? 1 + (int32_t)p / 50 : (int32_t)p / 2;
|
||||
if (eu_ch(p)) *m = (uint8_t)clamp((int32_t)*m + (int32_t)(eu_rnd() % (uint32_t)(2 * st + 1)) - st, 0, top);
|
||||
}
|
||||
}
|
||||
eu_gen(k, 0);
|
||||
}
|
||||
/* (V10.16) called every UI frame: playing (not a song's chain), each track with EVERY on mutates in the last beat of
|
||||
* every EVERY bars (the pattern new from the next bar) */
|
||||
static void eu_tick(void)
|
||||
{
|
||||
uint32_t k, b = bar_n;
|
||||
for (k = 0; !song.playing && k < NTRK; k++) eu[k].bar = 0; /* (stopped: from the top again) */
|
||||
if (!song.playing || chain_busy() || beat_n != 3u || beat_pos < beat_samples() / 2u) return;
|
||||
for (k = 0; k < NTRK; k++) {
|
||||
eu_t *e = &eu[k];
|
||||
if (!e->on || !e->mu[0] || e->bar == (uint8_t)(b + 1u) || (b + 1u) % (1u << (e->mu[0] - 1u))) continue;
|
||||
e->bar = (uint8_t)(b + 1u);
|
||||
eu_mutate(k, e);
|
||||
if (k == song.sel) ui.force = 1;
|
||||
}
|
||||
}
|
||||
/* (V10.16 .. V10.8.19) MUTATE (the bar-by-bar mutations, its page) gone in V10.8.20 (the owner: the flash): its settings
|
||||
* (eu_t.mu) kept with the projects and the editor's descriptors, read by nothing */
|
||||
|
||||
/* OCT+ a new variation, OCT- the one before; (V10.16) on MUTATE: OCT+ a mutation now, OCT- back to the anchor */
|
||||
static void eu_oct(int up, int mu)
|
||||
/* OCT+ a new variation, OCT- the one before ((V10.8.20) MUTATE's OCT+ / OCT- gone with it) */
|
||||
static void eu_oct(int up)
|
||||
{
|
||||
eu_t *e = eu_of(song.sel);
|
||||
if (chain_busy()) { ui_message("SONG PLAYS: STOP IT TO EDIT"); return; }
|
||||
if (mu) {
|
||||
if (up) eu_mutate(song.sel, e);
|
||||
else { memcpy((uint8_t *)e + EU_Z0, eu_z[song.sel], EU_ZN); e->seed = eu_zs[song.sel]; e->xm = 0; eu_gen(song.sel, 1); }
|
||||
ui_message(up ? "MUTATED" : "ANCHOR");
|
||||
return;
|
||||
}
|
||||
if (up) { e->prev = e->seed; e->seed = (uint16_t)(e->seed * 25173u + 13849u); }
|
||||
else { uint16_t s = e->seed; e->seed = e->prev; e->prev = s; }
|
||||
eu_anchor(song.sel);
|
||||
@@ -617,53 +558,6 @@ static void eu_ring(const track_t *t, int32_t cx, int32_t cy, int32_t rad, uint3
|
||||
cv_frame(x - r - 2, y - r - 2, 2 * r + 5, 2 * r + 5, col);
|
||||
}
|
||||
}
|
||||
/* (V10.24, the user's pick A) SEQ > MUTATE: the anchor's pattern (grey) above, the one playing below, the steps a
|
||||
* mutation changed in the accent; at the right an arc fills to the next mutation (the bars left in it); OCT+ / OCT- */
|
||||
static void eu_strip(const track_t *t, const uint8_t *za, int32_t y0, int32_t hh, uint32_t len, uint32_t now, int anchor)
|
||||
{
|
||||
int32_t cw = 180 / (int32_t)len, i, j;
|
||||
uint32_t dr = drum_track(t) != 0, lo = 127, hi = 0, v;
|
||||
cw = cw < 2 ? 2 : cw;
|
||||
for (i = 0; !dr && i < (int32_t)len; i++) /* (a melody: its range, of both rows) */
|
||||
for (j = 0; j < 2; j++) {
|
||||
v = j ? za[i] : eu_val(t, &t->step[i]);
|
||||
if (v) { lo = v < lo ? v : lo; hi = v > hi ? v : hi; }
|
||||
}
|
||||
if (hi < lo + 6u) { lo = hi >= 6u ? hi - 6u : 0u; hi = lo + 6u; }
|
||||
for (i = 0; i < (int32_t)len && i * cw < 182; i++) {
|
||||
uint32_t a = za[i], c = anchor ? a : eu_val(t, &t->step[i]);
|
||||
int32_t x = 4 + i * cw;
|
||||
uint16_t col = anchor ? T_MID : c != a ? T_ACCENT : T_THEME;
|
||||
if (dr)
|
||||
for (j = 0; j < (int32_t)NLANE; j++) {
|
||||
if ((c >> j) & 1u) cv_rect(x, y0 + j * hh / 8, cw - 1, hh / 8 - 1, anchor ? T_MID : ((a >> j) & 1u) ? T_THEME : T_ACCENT);
|
||||
else if (!anchor && ((a >> j) & 1u)) cv_rect(x, y0 + j * hh / 8 + hh / 16 - 1, cw - 1, 1, T_DIM); /* (a hit gone) */
|
||||
}
|
||||
else if (c)
|
||||
cv_rect(x, y0 + hh - 3 - (int32_t)((c - lo) * (uint32_t)(hh - 4) / (hi - lo)), cw - 1, c != a && !anchor ? 4 : 3, col);
|
||||
if (!anchor && (uint32_t)i == now) cv_rect(x, y0 + hh + 2, cw - 1, 1, T_TEXT);
|
||||
}
|
||||
}
|
||||
static void graph_mutate(const track_t *t, const eu_t *e)
|
||||
{
|
||||
int32_t h = (int32_t)graph_h(), hh = (h - 44) / 2, cx = 210, cy = h / 2 - 4, i;
|
||||
uint32_t len = (uint32_t)clamp(t->p[P_SLEN], 1, 64), now = song.playing ? t->seq_idx % len : ~0u;
|
||||
uint32_t ev = e->mu[0] ? 1u << (e->mu[0] - 1u) : 0u, q = ev ? ((bar_n % ev) * 4u + beat_n % 4u) * 64u / (ev * 4u) : 0u;
|
||||
char b[8];
|
||||
cv_text(4, 2, &AF_X, "ANCHOR", T_DIM);
|
||||
eu_strip(t, eu_za[song.sel % NTRK], 12, hh, len, now, 1);
|
||||
cv_text(4, 18 + hh, &AF_X, "NOW", T_TEXT);
|
||||
eu_strip(t, eu_za[song.sel % NTRK], 28 + hh, hh, len, now, 0);
|
||||
for (i = 0; i < 64; i++) { /* the arc to the next mutation */
|
||||
uint32_t a = (uint32_t)i * 1024u + 49152u;
|
||||
int32_t x = cx + ((20 * og_cos(a)) >> 15), y = cy + ((20 * og_sin(a)) >> 15);
|
||||
cv_rect(x - 1, y - 1, 2, 2, ev && song.playing && (uint32_t)i <= q ? T_ACCENT : T_DIM);
|
||||
}
|
||||
cv_text_in(cx - 18, cy - 9, 36, &AF_X, ev ? "NEXT" : "OFF", T_DIM, T_SURF);
|
||||
if (ev) { b[0] = 0; fmt_int(b, (int32_t)(song.playing ? ev - bar_n % ev : ev)); cv_text_in(cx - 18, cy + 2, 36, &AF_X, b, T_TEXT, T_SURF); }
|
||||
cv_text(4, h - 10, &AF_X, "OCT+ MUTATE", T_ACCENT);
|
||||
cv_text_r(234, h - 10, &AF_X, "OCT- ANCHOR", T_THEME, T_SURF);
|
||||
}
|
||||
static __attribute__((noinline)) void graph_euclid(const track_t *t)
|
||||
{
|
||||
static const char *const LN[NLANE + 1] = {"ALL", "BD", "SD", "CP", "CH", "OH", "TM", "RS", "CB"};
|
||||
@@ -674,13 +568,6 @@ static __attribute__((noinline)) void graph_euclid(const track_t *t)
|
||||
int32_t h = (int32_t)graph_h(), cy = h / 2 - 5, cx = 64, rad = h / 2 - 17 < 54 ? h / 2 - 17 : 54;
|
||||
uint32_t now = song.playing ? t->seq_idx % len : ~0u, t_now = now;
|
||||
char b[12];
|
||||
if (cur_page()->id[0] == ID_MU0) { graph_mutate(t, e); return; }
|
||||
if (e->mu[0]) { /* (V10.16) MUTATE on: the bars to the next one */
|
||||
uint32_t ev = 1u << (e->mu[0] - 1u);
|
||||
str_cpy(b, "MUT ", sizeof b);
|
||||
fmt_int(b + 4, (int32_t)(song.playing ? ev - bar_n % ev : ev));
|
||||
cv_text(4, 2, &AF_X, b, T_ACCENT);
|
||||
}
|
||||
if (dr) { /* VARY's turns: of the lanes' least common length */
|
||||
for (cyc = 1, i = 0; i < NLANE; i++) {
|
||||
uint32_t a = cyc, c = e->l[i].n;
|
||||
|
||||
+15
-6
@@ -83,7 +83,11 @@ static void graph_adsr(const track_t *t, uint16_t c)
|
||||
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; }
|
||||
if (adsr_tr != tr) { /* (V10.8.19, BYTE's v2) the trail from the start: ghosts fainter back */
|
||||
for (k = 0; k < 10; k++) adsr_h[k] = (uint8_t)(118 - k * 7);
|
||||
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) */
|
||||
@@ -97,7 +101,7 @@ static void graph_adsr(const track_t *t, uint16_t c)
|
||||
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;
|
||||
uint16_t lc = k ? ux_mix(T_BG, heat_col(150 - k * 12), 95 - k * 7) : tc; /* (v2: warm near, cold far) */
|
||||
if (k && !adsr_h[k]) continue;
|
||||
for (i = 0; i < n; i++) {
|
||||
int32_t y = oy - lv[i] * H / 1000 * g / 127;
|
||||
@@ -106,13 +110,19 @@ static void graph_adsr(const track_t *t, uint16_t c)
|
||||
}
|
||||
}
|
||||
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 */
|
||||
{ /* A D S R: tags at the front shape's corners, (v2) each stage's value beside its tag */
|
||||
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;
|
||||
const char *u = "";
|
||||
char vb[12];
|
||||
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);
|
||||
param_format(track_desc(t, pg->id[q]), t->p[pg->id[q]], vb, &u);
|
||||
str_cpy(vb + str_len(vb), u, sizeof vb - str_len(vb));
|
||||
if (graph_ht == 100 && (q < 3 || x + 8 + text_w(&AF_X, vb) < 236)) /* (MENU > LARGE's strip: the tags only) */
|
||||
cv_text(x + 8, y + 1 - AF_X_CAP_Y, &AF_X, vb, T_MID);
|
||||
}
|
||||
}
|
||||
if (pg->id[0] == P_ATK) { /* the track's envelope now: the loudest voice's, a yellow node */
|
||||
@@ -1303,7 +1313,7 @@ static int drift_on(void)
|
||||
return 0;
|
||||
return !ui.home && !sys_load && !ANIM_OFF() && strip_kind() == SK_NONE && !roll_view(cur_page()) &&
|
||||
!seq_roll_view(cur_page()) &&
|
||||
g != GR_ROLL && g != GR_SHAPE && g != GR_COMP && g != GR_FUGUE && g != GR_LIVE && /* (0.8.3: LENTE's step, the
|
||||
g != GR_ROLL && g != GR_COMP && g != GR_FUGUE && g != GR_LIVE && /* (0.8.3: LENTE's step, the
|
||||
* heads; p2: LIVE's rails) */
|
||||
g != GR_STEPS && g != GR_CHANCE && g != GR_BROWSE && g != GR_USER && g != GR_SLOTS && g != GR_EVENTS &&
|
||||
g != GR_SONG && g != GR_TOOLS && g != GR_PATS;
|
||||
@@ -1609,7 +1619,7 @@ static __attribute__((noinline)) uint32_t graph_signature(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pg->graph == GR_STEPS || pg->graph == GR_ROLL || pg->graph == GR_CHANCE || pg->graph == GR_SHAPE || roll_view(pg) ||
|
||||
if (pg->graph == GR_STEPS || pg->graph == GR_ROLL || pg->graph == GR_CHANCE || roll_view(pg) ||
|
||||
seq_roll_view(pg)) {
|
||||
uint32_t ph = song.playing ? seq_src(t, t->seq_idx) : 0xFFFFu, rl = roll_view(pg) || seq_roll_view(pg) ||
|
||||
pg->graph == GR_CHANCE;
|
||||
@@ -2170,7 +2180,6 @@ static void draw_graph(void)
|
||||
case GR_ROLL:
|
||||
case GR_TRACKGEN:
|
||||
case GR_CHANCE:
|
||||
case GR_SHAPE: /* (0.6.85) STRETCH: the whole sequence, as the roll shows it */
|
||||
cv_oy = 0;
|
||||
if (drum_track(t))
|
||||
graph_grid(t, c);
|
||||
|
||||
+2
-104
@@ -1126,102 +1126,13 @@ static __attribute__((noinline)) void comp_knob(uint32_t slot, int32_t steps)
|
||||
*ap = (uint8_t)(comp_vat(a, (uint32_t)i) | b);
|
||||
}
|
||||
}
|
||||
/* (0.6.85) SEQ > STRETCH: KNOB 1 STRETCH /8 .. /2, x1, x2 .. x8; KNOB 2 REPEAT OFF, x2 .. x8, TO 64; (0.6.92) done as the
|
||||
* knob turns, always from the sequence as it was before the first turn (its base: the steps, LEN and automation,
|
||||
* kept while the result stays untouched; back to the middle = back to it; UNDO: GLO + G4); KNOB 3 NUDGE: the whole
|
||||
* sequence a step left / right; KNOB 4 ROTATE: played from another step (P_SOFS). ui_tools.c tl_stretch, tl_repeat,
|
||||
* tl_shift */
|
||||
/* (V10.8.20) SEQ > STRETCH gone (the owner: the flash); its tools (ui_tools.c tl_*) stay for the FX layer and TOOLS */
|
||||
#define tl_len ev_len /* (ui_events.c: the same length, one copy) */
|
||||
static void tl_take(const track_t *t);
|
||||
static void tl_shift(track_t *t, uint32_t len, uint32_t d);
|
||||
static void tl_order(track_t *t, uint32_t len, const uint8_t *src);
|
||||
static uint32_t tl_stretch(track_t *t, int32_t k);
|
||||
static uint32_t tl_repeat(track_t *t, uint32_t k);
|
||||
static struct {
|
||||
uint8_t valid, trk, which; /* which: the knob the base belongs to (0.6.96: the other knob
|
||||
* takes the result as its base, so REPEAT then STRETCH
|
||||
* stretches the repeats) */
|
||||
int16_t len;
|
||||
uint32_t sig; /* the result's steps: another sig, the user edited: a new base */
|
||||
step_t step[NSTEP];
|
||||
motion_store_t mo;
|
||||
} shp_base;
|
||||
static void shape_apply(uint32_t which)
|
||||
{
|
||||
track_t *t = TSEL;
|
||||
uint32_t was, n, f;
|
||||
char m[24];
|
||||
if (chain_busy()) { ui_message("SONG PLAYS: STOP IT TO EDIT"); return; }
|
||||
if (!shp_base.valid || shp_base.trk != song.sel || shp_base.sig != steps_sig(t) || shp_base.which != which) { /* the
|
||||
* base: as it is now (the other knob's result included) */
|
||||
undo_mark();
|
||||
shp_base.valid = 1; shp_base.trk = (uint8_t)song.sel; shp_base.len = t->p[P_SLEN]; shp_base.which = (uint8_t)which;
|
||||
memcpy(shp_base.step, t->step, sizeof shp_base.step);
|
||||
f = motion_guard(); memcpy(&shp_base.mo, &motion, sizeof shp_base.mo); motion_unguard(f);
|
||||
if (which == 0u) shp_r = 0; else shp_i = 7; /* (the other knob's pick starts over) */
|
||||
} else { /* back to the base, then the new pick (as the tools write:
|
||||
* straight into the steps, the automation with them) */
|
||||
memcpy(t->step, shp_base.step, sizeof t->step);
|
||||
t->p[P_SLEN] = shp_base.len;
|
||||
f = motion_guard(); memcpy(&motion, &shp_base.mo, sizeof motion); RING_PUBLISH(); motion_unguard(f);
|
||||
}
|
||||
was = (uint32_t)clamp(shp_base.len, 1, NSTEP);
|
||||
n = which == 0u ? (shp_k() == 1 ? was : tl_stretch(t, shp_k())) : (shp_rep() == 1u ? was : tl_repeat(t, shp_rep()));
|
||||
shp_base.sig = steps_sig(t);
|
||||
if (!n) { ui_message("LEN 64: NO ROOM"); return; }
|
||||
str_cpy(m, "LEN ", sizeof m); fmt_int(m + 4, (int32_t)was); str_cpy(m + str_len(m), " > ", 4);
|
||||
fmt_int(m + str_len(m), (int32_t)n);
|
||||
if (which == 0u && shp_k() > 1 && was * (uint32_t)shp_k() > NSTEP) str_cpy(m + str_len(m), " CUT", 5);
|
||||
ui_message(m);
|
||||
}
|
||||
/* (NUDGE's step) a note's first step: back from i over TIEs; one past its last: on from i over TIEs, inside len */
|
||||
static __attribute__((noinline)) uint32_t ndg_note(const step_t *s, uint32_t i) { while (i && s[i].time == ST_TIE) i--; return i; }
|
||||
static __attribute__((noinline)) uint32_t ndg_end(const step_t *s, uint32_t i, uint32_t len)
|
||||
{
|
||||
while (++i < len && s[i].time == ST_TIE) {}
|
||||
return i;
|
||||
}
|
||||
static void shape_knob(uint32_t slot, int32_t steps)
|
||||
{
|
||||
int32_t d = steps > 0 ? 1 : -1;
|
||||
if (slot == 0u) { shp_i = (uint8_t)clamp((int32_t)shp_i + d, 0, 14); shape_apply(0); }
|
||||
else if (slot == 1u) { shp_r = (uint8_t)clamp((int32_t)shp_r + d, 0, 8); shape_apply(1); }
|
||||
else if (slot == 2u && ndg_step == 1u) { /* (V10.25) the cursor step off the grid, 64ths of a step */
|
||||
micro_edit(steps);
|
||||
} else if (slot == 2u && ndg_step) { /* (V10.7.4) OCT+ again: the cursor step itself a step left / right
|
||||
* (traded with its neighbour), the cursor with it. A note moves with
|
||||
* its TIEs and trades with the neighbour's note whole (V10.7.4
|
||||
* swapped single steps: a moved note lost its length, the TIE left
|
||||
* behind lengthened the note before it); at step 1 / LEN it stays
|
||||
* (V10.7.4 wrapped: a note's TIEs cannot) */
|
||||
track_t *t = TSEL;
|
||||
uint8_t src[NSTEP];
|
||||
uint32_t len = tl_len(t), c = ui.cursor % len, a, b, x, y, z, j;
|
||||
if (chain_busy()) { ui_message("SONG PLAYS: STOP IT TO EDIT"); return; }
|
||||
a = ndg_note(t->step, c); /* the cursor's note [a, b): back over its TIEs, past them */
|
||||
b = ndg_end(t->step, a, len);
|
||||
if (d > 0 ? b >= len : !a) /* (an end: it stays) */
|
||||
return;
|
||||
if (d > 0) { x = a; y = b; z = ndg_end(t->step, b, len); }
|
||||
else { y = a; z = b; x = ndg_note(t->step, a - 1u); }
|
||||
for (j = 0; j < len; j++) /* [x, y) and [y, z) trade places */
|
||||
src[j] = (uint8_t)(j < x || j >= z ? j : j - x < z - y ? y + j - x : j - (z - y));
|
||||
x = d > 0 ? x + z - y : x; /* (the note's new place) */
|
||||
undo_mark();
|
||||
tl_take(t);
|
||||
tl_order(t, len, src);
|
||||
ui.cursor = (uint8_t)x;
|
||||
} else if (slot == 2u) {
|
||||
track_t *t = TSEL;
|
||||
if (chain_busy()) { ui_message("SONG PLAYS: STOP IT TO EDIT"); return; }
|
||||
tl_take(t);
|
||||
tl_shift(t, tl_len(t), d > 0 ? 1u : tl_len(t) - 1u);
|
||||
ui_message(d > 0 ? "NUDGED RIGHT" : "NUDGED LEFT");
|
||||
} else {
|
||||
TSEL->p[P_SOFS] = (int16_t)clamp(TSEL->p[P_SOFS] + steps, -32, 32);
|
||||
knob_cap(TSEL, P_SOFS);
|
||||
}
|
||||
}
|
||||
/* (0.8.5) EDIT > FOCUS: KNOB 1 the parameter (E1..E8 with a name, no wrap), 2 its value, 3 the SRC of the MOD slot aimed
|
||||
* at it (from OFF: a free slot takes it, its DEST E1..E8; back to OFF: the slot free again), 4 that slot's AMT */
|
||||
static __attribute__((noinline)) void focus_knob(uint32_t slot, int32_t steps)
|
||||
@@ -1405,10 +1316,6 @@ static void edit_param(uint32_t slot, int32_t steps)
|
||||
gco_knob(slot, steps);
|
||||
return;
|
||||
}
|
||||
if (pg->graph == GR_SHAPE) { /* (0.6.85) STRETCH, REPEAT (picked, OCT+ does it), NUDGE (now) */
|
||||
shape_knob(slot, steps);
|
||||
return;
|
||||
}
|
||||
if (pg->graph == GR_FUGUE) { /* (0.6.52) HEAD, RATE, DIR, INTERVAL */
|
||||
fg_set_t *f = &fg_set[song.sel % NTRK][fg_ui % FG_HEADS];
|
||||
int32_t d = steps > 0 ? 1 : -1;
|
||||
@@ -2549,7 +2456,6 @@ static void ui_input(void)
|
||||
{
|
||||
ui_input_frame();
|
||||
if (!ui_preview_ok() && (preview_req || preview_left)) preview_req = PREVIEW_CANCEL;
|
||||
eu_tick(); /* (V10.16) EUCLID's MUTATE, on the bar */
|
||||
gen_tick(); /* (V10.7.66) GEN on the bar, ENTRY BUILD */
|
||||
scale_link(); /* (JIANT 0.4) one scale for every melodic track (after the
|
||||
* frame's edits) */
|
||||
@@ -3035,21 +2941,13 @@ static void ui_input_frame(void)
|
||||
ui.force = 1;
|
||||
break;
|
||||
}
|
||||
if (!ui.home && !ui.menu && !ui.confirm && cur_page()->graph == GR_SHAPE) { /* (V10.25) STRETCH: NUDGE's */
|
||||
ndg_step = b != B_OCTUP ? 0u : ndg_step == 1u ? 2u : 1u; /* mode, OCT- the sequence (blue), OCT+ the
|
||||
* step's MICRO (red), OCT+ again the step itself (V10.7.4) */
|
||||
ui_message(ndg_step == 2u ? "NUDGE: THE STEP" : ndg_step ? "NUDGE: THE STEP'S MICRO" : "NUDGE: THE SEQUENCE");
|
||||
ui.force = 1;
|
||||
break;
|
||||
}
|
||||
if (!ui.home && !ui.menu && !ui.confirm && cur_page()->graph == GR_COMP && b == B_OCTDN && !fm1_in.notes) {
|
||||
if (chain_busy()) ui_message("SONG PLAYS: STOP IT TO EDIT"); /* (V10.7.62) STEP FX: OCT- clears the */
|
||||
else confirm_open(CF_CLEAR_COMP, song.sel); /* track's (a dialog) */
|
||||
break;
|
||||
}
|
||||
if (!ui.home && !ui.menu && !ui.confirm && cur_page()->graph == GR_EUCLID) { /* (V10.6) EUCLID / MODES: */
|
||||
eu_oct(b == B_OCTUP, cur_page()->id[0] == ID_MU0); /* OCT+ a new variation, OCT- the one before;
|
||||
* (V10.16) MUTATE: a mutation now, back to the anchor */
|
||||
eu_oct(b == B_OCTUP); /* OCT+ a new variation, OCT- the one before */
|
||||
break;
|
||||
}
|
||||
oct_key(b, both); /* (V10.6z4: a note held, the expression keys) */
|
||||
|
||||
@@ -231,7 +231,7 @@ static __attribute__((noinline)) int16_t *mom_vp(uint32_t k, const param_desc_t
|
||||
return 0;
|
||||
*d = home_param(k, &vp);
|
||||
} else {
|
||||
if (FIT_PAGE(pg) || pg->scope == SC_STEP || pg->scope == SC_TRK || ((act_cols() >> k) & 1u) || g == GR_COMP || g == GR_GCOMP || g == GR_SHAPE ||
|
||||
if (FIT_PAGE(pg) || pg->scope == SC_STEP || pg->scope == SC_TRK || ((act_cols() >> k) & 1u) || g == GR_COMP || g == GR_GCOMP ||
|
||||
g == GR_FUGUE || g == GR_CHANCE || g == GR_DXSND || g == GR_SWARM || g == GR_FOCUS || (g == GR_STAGE && k < 2u) ||
|
||||
g == GR_EVENTS || g == GR_MOTION || g == GR_SONG || g == GR_BROWSE || g == GR_TOOLS || g == GR_SLOTS ||
|
||||
g == GR_USER || g == GR_PATS || DX_KIT3(pg) || fop_page(g) ||
|
||||
|
||||
@@ -78,11 +78,11 @@ enum { LV_PAT, LV_BAR, LV_STEP, LV_N }; /* SEQ's pictures: the b
|
||||
* PLAYHEADS . STRETCH . COMP (COMP 2 after it, by SELECT as before) . AUTO (AUTOMATION, AUTO LIST). BAR and NOTE stay pages
|
||||
* (code puts them) but out of the chain, until the step held opens its own (the mock-up's slice 5) */
|
||||
static const nv_t CE_SEQ[] = {NV("STEP", 0, 0, LV_BAR), NV("PATTERN", "LENGTH", 1, LV_PAT), NV("RHYTHM", 0, 1, LV_PAT), NV("TRACK", 0, 1, LV_PAT),
|
||||
NV("EUCLID", 0, 2, LV_PAT), NV("MODES", 0, 2, LV_PAT), NV("MUTATE", 0, 2, LV_PAT),
|
||||
NV("PLAYHEADS", 0, 3, LV_PAT), NV("STRETCH", 0, 4, LV_PAT),
|
||||
NV("COMP", "STEP FX", 5, LV_STEP), NV("COMP 2", "STEP FX 2", 5, LV_STEP), NV("AUTOMATION", 0, 6, LV_BAR),
|
||||
NV("AUTO LIST", 0, 6, LV_BAR), NV("LYRIC STEP",0,6,LV_BAR),NV("TRACK GEN",0,7,LV_BAR)};
|
||||
static const ng_t CG_SEQ[] = {{"STEP", 0}, {"PATTERN", "PAT"}, {"EUCLID", "EUCL"}, {"PLAYHEADS", "HEAD"}, {"STRETCH", "STR"},
|
||||
NV("EUCLID", 0, 2, LV_PAT), NV("MODES", 0, 2, LV_PAT),
|
||||
NV("PLAYHEADS", 0, 3, LV_PAT),
|
||||
NV("COMP", "STEP FX", 4, LV_STEP), NV("COMP 2", "STEP FX 2", 4, LV_STEP), NV("AUTOMATION", 0, 5, LV_BAR),
|
||||
NV("AUTO LIST", 0, 5, LV_BAR), NV("LYRIC STEP",0,5,LV_BAR),NV("TRACK GEN",0,6,LV_BAR)}; /* (V10.8.20: STRETCH gone) */
|
||||
static const ng_t CG_SEQ[] = {{"STEP", 0}, {"PATTERN", "PAT"}, {"EUCLID", "EUCL"}, {"PLAYHEADS", "HEAD"},
|
||||
{"STEP FX", "SFX"}, {"AUTO", 0}, {"TRACK GEN", "GEN"}}; /* (V10.7.59: STEP FX, was COMP) */ /* (codex/coherence: PATTERN, was LENGTH: its
|
||||
* LENGTH RHYTHM TRACK; TRACK GEN, was GENERATE) */
|
||||
enum { FXL_TRACK, FXL_BUSES, FXL_EFFECT };
|
||||
|
||||
+118
-35
@@ -191,53 +191,97 @@ 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 */
|
||||
/* (V10.8.19, the owner: "big, clear, the notes it uses") KEY: "D MAJOR" large (the scale's whole name, AF_L, else M,
|
||||
* else its short one); the scale's notes as chips in their colours from ROOT (ROOT framed); an octave of keys, those
|
||||
* lit, each its degree (1 ..) on it */
|
||||
static const char *const SCL_LONG[] = {"CHROMATIC", "MAJOR", "MINOR", "DORIAN", "MIXOLYDIAN", "PENTATONIC", "MINOR PENTA",
|
||||
"HARMONIC MIN", "PHRYGIAN", "LYDIAN", "LOCRIAN", "MELODIC MIN", "BLUES", "WHOLE TONE",
|
||||
"DIM HALF-WHOLE", "DIM WHOLE-HALF"};
|
||||
static __attribute__((noinline)) void graph_key(const track_t *t, const page_t *pg)
|
||||
{
|
||||
uint32_t mask = scale_mask(t), rt = (uint32_t)clamp(t->p[P_ROOT], 0, 11), lit = 0, i;
|
||||
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 mask = scale_mask(t) & 0xFFFu, rt = (uint32_t)clamp(t->p[P_ROOT], 0, 11), i, n = 0, dg[12];
|
||||
const aafont_t *f = &AF_L;
|
||||
const char *u = "";
|
||||
char b[48];
|
||||
char b[32];
|
||||
(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);
|
||||
str_cpy(b + str_len(b), SCL_LONG[(uint32_t)t->p[P_SCALE] % NELEM(SCL_LONG)], 30 - str_len(b));
|
||||
if (text_w(f, b) > 228) f = &AF_M;
|
||||
if (text_w(f, b) > 228) { b[str_len(NN12[rt]) + 1u] = 0; param_format(&TP[P_SCALE], t->p[P_SCALE], b + str_len(b), &u); }
|
||||
cv_text(6, 4 - (f == &AF_L ? AF_L_CAP_Y : AF_M_CAP_Y), f, b, T_TEXT);
|
||||
for (i = 0; i < 12u; i++) /* dg[note]: its degree (1 ..), 0 not in the scale */
|
||||
dg[(rt + i) % 12u] = mask >> i & 1u ? ++n : 0u;
|
||||
for (i = 0; i < 12u; i++) /* the chips, from ROOT */
|
||||
if (mask >> i & 1u) {
|
||||
uint32_t nt = (rt + i) % 12u, k = dg[nt] - 1u;
|
||||
int32_t w = 228 / (int32_t)n, x = 6 + (int32_t)k * w;
|
||||
cv_rect(x, 34, w - 2, 24, note_col(nt));
|
||||
cv_text_in(x, 34 + (n > 9u ? CAP_IN(X, 24) : CAP_IN(M, 24)), w - 2, n > 9u ? &AF_X : &AF_M, NN12[nt], T_INK, note_col(nt));
|
||||
if (!i) cv_frame(x - 1, 33, w, 26, T_TEXT);
|
||||
}
|
||||
cv_text(8, 116, &AF_X, b, T_MID);
|
||||
for (i = 0; i < 12u; i++) { /* an octave of keys from C, the scale's lit, each its degree */
|
||||
uint32_t blk = i >= 7u, nt = blk ? BK[i - 7u] : WH[i];
|
||||
int32_t x = blk ? 2 + (int32_t)BX[i - 7u] * 32 - 10 : 8 + (int32_t)i * 32, w = blk ? 19 : 30, kh = blk ? 40 : 68;
|
||||
uint16_t c = dg[nt] ? note_col(nt) : blk ? 0x10A2u : 0xCE59u;
|
||||
char d[3];
|
||||
cv_rect(x, 66, w, kh, c);
|
||||
if (dg[nt]) {
|
||||
fmt_int(d, (int32_t)dg[nt]);
|
||||
cv_text_in(x, 66 + kh - (blk ? 14 : 22), w, blk ? &AF_X : &AF_M, d, T_INK, c);
|
||||
}
|
||||
if (nt == rt)
|
||||
cv_rect(x + w / 2 - 2, 66 + kh - 4, 4, 3, 0x0000u);
|
||||
}
|
||||
}
|
||||
/* 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) */
|
||||
/* (V10.8.19, JIANT BYTE's CHORD redesign (GPL, as BYTE has it), the owner's pick) a chord's name from its notes (pn[0]
|
||||
* the root): long "D MIN ADD9", short the quality alone "MIN9" */
|
||||
static void chord_label(const uint8_t *pn, uint32_t n, char *o, int lng)
|
||||
{
|
||||
static const char LQ[12][10] = {" DIM7", " HALF-DIM", " DIM", " AUG", " SUS4", " SUS2", " MIN7", " MIN MAJ7", " MIN", " MAJ7",
|
||||
" 7", " MAJ"};
|
||||
static const char SQ[15][5] = {"DIM7", "M7B5", "DIM", "AUG", "SUS4", "SUS2", "MIN7", "MIN", "MIN", "MAJ7", "7", "MAJ",
|
||||
"MIN9", "MAJ9", "9"}; /* (the last three: 6, 9, 10 with a ninth) */
|
||||
uint32_t m = 0, k, q;
|
||||
int mi, dim, aug, s4, s2, b7, M7, six, nine, d7;
|
||||
for (k = 1; k < n && k < 8u; k++) m |= 1u << (((uint32_t)pn[k] + 120u - pn[0]) % 12u);
|
||||
mi = (m >> 3 & 1) && !(m >> 4 & 1); dim = mi && (m >> 6 & 1) && !(m >> 7 & 1); aug = (m >> 4 & 1) && (m >> 8 & 1) && !(m >> 7 & 1);
|
||||
s4 = !(m >> 3 & 1) && !(m >> 4 & 1) && (m >> 5 & 1); s2 = !(m >> 3 & 1) && !(m >> 4 & 1) && !s4 && (m >> 2 & 1);
|
||||
b7 = m >> 10 & 1; M7 = m >> 11 & 1; six = (m >> 9 & 1) && !dim; nine = (m >> 2 & 1) && !s2; d7 = dim && (m >> 9 & 1);
|
||||
q = dim ? (d7 ? 0u : b7 ? 1u : 2u) : aug ? 3u : s4 ? 4u : s2 ? 5u : mi ? (b7 ? 6u : M7 ? 7u : 8u) : M7 ? 9u : b7 ? 10u : 11u;
|
||||
if (lng) {
|
||||
str_cpy(o, NN12[pn[0] % 12u], 24);
|
||||
str_cpy(o + str_len(o), LQ[q], 24);
|
||||
if (six && !d7) str_cpy(o + str_len(o), " 6", 24);
|
||||
if (nine) str_cpy(o + str_len(o), b7 || M7 ? " 9" : " ADD9", 24);
|
||||
return;
|
||||
}
|
||||
str_cpy(o, SQ[nine && (q == 6u || q == 9u || q == 10u) ? (q == 6u ? 12u : q == 9u ? 13u : 14u) : q], 12);
|
||||
if (six && !d7) str_cpy(o + str_len(o), "6", 12);
|
||||
if (nine && !b7 && !M7) str_cpy(o, mi ? "MI+9" : dim ? "DIM+9" : "ADD9", 12);
|
||||
}
|
||||
/* note k's interval on its key (no lowercase in the font: a flat "-", as "E-" is minor; a sharp "#") */
|
||||
static void chord_ivl(int32_t x, int32_t y, const uint8_t *pn, uint32_t k)
|
||||
{
|
||||
static const char IV[12][3] = {"R", "-9", "9", "-3", "3", "4", "-5", "5", "#5", "6", "-7", "7"};
|
||||
const char *s = k ? IV[((uint32_t)pn[k] + 120u - pn[0]) % 12u] : "R";
|
||||
cv_text(x + (13 - text_w(&AF_X, s)) / 2, y - AF_X_CAP_Y, &AF_X, s, 0x0000u);
|
||||
}
|
||||
/* CHORD: the last key's chord named large (yellow while it sounds, else the track's colour), TYPE . VOICING under it; two
|
||||
* octaves of keys, the chord's notes lit (its root the track's colour) and each its interval; the seven degrees as tags,
|
||||
* each its chord's short name, the one of the last key yellow */
|
||||
static __attribute__((noinline)) void graph_chord(const track_t *t)
|
||||
{
|
||||
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];
|
||||
uint32_t mask = scale_mask(t), c = 0, i, d, rt = (uint32_t)clamp(t->p[P_ROOT], 0, 11);
|
||||
uint16_t tc = TRK_COL[(uint32_t)(t - trk) % 6u];
|
||||
uint32_t key = last_note, kd, pd = 99u, snd = 0, k, n;
|
||||
uint8_t deg[12], pn[8];
|
||||
const char *u = "";
|
||||
char b[32], v[12];
|
||||
char b[32], v[12], nm[24];
|
||||
for (i = 0; i < 12u; i++)
|
||||
if (mask >> i & 1u && c < 7u)
|
||||
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);
|
||||
deg[c++] = (uint8_t)i;
|
||||
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));
|
||||
@@ -245,7 +289,46 @@ 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);
|
||||
cv_text(8, 120, &AF_X, b, T_MID);
|
||||
kd = (key + 12u - rt) % 12u;
|
||||
for (k = 0; k < NVOICE; k++) snd |= t->v[k].active && t->v[k].gate;
|
||||
for (d = 0; d < c; d++) if (deg[d] == kd) pd = d;
|
||||
n = t->p[P_CHRD] ? chord_peek(t, key, pn) : 0u;
|
||||
if (n == 1u) { /* (V10.8.20) CHORD on, one note sounds: say why (a kit, not POLY) */
|
||||
str_cpy(nm, drum_track(t) ? "DRUM TRACK" : "NOT POLY", sizeof nm);
|
||||
str_cpy(b, drum_track(t) ? "CHORDS PLAY ON SYNTH TRACKS" : "CHORDS NEED EDIT > PLAY > POLY", 32);
|
||||
n = 0;
|
||||
} else if (t->p[P_CHRD]) chord_label(pn, n, nm, 1); else str_cpy(nm, "OFF", sizeof nm);
|
||||
cv_text(10, 4 - AF_L_CAP_Y + 1, text_w(&AF_L, nm) <= 220 ? &AF_L : &AF_M, nm, snd ? HUD_YE : t->p[P_CHRD] ? tc : T_DIM);
|
||||
cv_free_text(10, 26 - AF_X_CAP_Y + 1, &AF_X, b, T_MID, cv_bg, 220);
|
||||
{ /* the keys: two octaves from the C under its lowest note */
|
||||
static const uint8_t WK[7] = {0, 2, 4, 5, 7, 9, 11}, BK[5] = {1, 3, 6, 8, 10}, BX[5] = {0, 1, 3, 4, 5};
|
||||
uint32_t lo = n ? pn[0] : key, base = lo / 12u * 12u, on[25] = {0}, oct, w;
|
||||
for (k = 0; k < n && k < 8u; k++) { uint32_t r = (uint32_t)pn[k] - base; while (r >= 24u) r -= 12u; on[r] = k + 1u; }
|
||||
for (oct = 0; oct < 2u; oct++)
|
||||
for (w = 0; w < 7u; w++) {
|
||||
uint32_t r = oct * 12u + WK[w], h = on[r];
|
||||
int32_t x = 8 + (int32_t)(oct * 7u + w) * 16;
|
||||
cv_rect(x, 40, 15, 52, h ? (h == 1u ? tc : snd ? HUD_YE : T_TEXT) : T_RAISE);
|
||||
if (h) chord_ivl(x + 1, 80, pn, h - 1u);
|
||||
}
|
||||
for (oct = 0; oct < 2u; oct++)
|
||||
for (w = 0; w < 5u; w++) {
|
||||
uint32_t r = oct * 12u + BK[w], h = on[r];
|
||||
int32_t x = 8 + (int32_t)(oct * 7u + BX[w]) * 16 + 10;
|
||||
cv_rect(x, 40, 11, 32, h ? (h == 1u ? tc : snd ? HUD_YE : T_TEXT) : T_BG);
|
||||
if (h) chord_ivl(x - 1, 60, pn, h - 1u);
|
||||
}
|
||||
}
|
||||
for (d = 0; d < c; d++) { /* the degrees: numeral tag, its chord's short name */
|
||||
uint8_t nt[8];
|
||||
int32_t x = 8 + (int32_t)d * 32, tw = text_w(&AF_X, RN7[d]) + 4;
|
||||
uint32_t m = n ? chord_peek(t, 48u + rt + deg[d], nt) : 0u, on = d == pd;
|
||||
uint16_t bg = on ? HUD_YE : d == 0u ? tc : HUD_BL;
|
||||
char sn[12];
|
||||
cv_rect(x, 100, tw, 11, bg);
|
||||
cv_text_on(x + 2, 101 - AF_X_CAP_Y, &AF_X, RN7[d], on || d == 0u ? 0x0000u : T_TEXT, bg);
|
||||
if (m) { chord_label(nt, m, sn, 0); cv_text(x, 116 - AF_X_CAP_Y, &AF_X, sn, on ? HUD_YE : T_TEXT); }
|
||||
}
|
||||
}
|
||||
static void graph_arp(const track_t *t)
|
||||
{
|
||||
|
||||
@@ -140,24 +140,6 @@ static void chord_nm(char *b, const uint8_t *pc, uint32_t d, uint32_t rt)
|
||||
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)
|
||||
|
||||
+5
-8
@@ -596,7 +596,7 @@ static void state(void) /* a playing song with steps on
|
||||
{
|
||||
uint32_t i;
|
||||
ui_power_on();
|
||||
ndg_step = 0; scn_on = 0; memset(scn_role, 0, sizeof scn_role); /* (V10.25: the session's NUDGE and SCENE off) */
|
||||
scn_on = 0; memset(scn_role, 0, sizeof scn_role); /* (V10.25: the session's NUDGE and SCENE off) */
|
||||
dx_mute_set(0);
|
||||
memset(macro_v, 0, sizeof macro_v);
|
||||
if (large_on) ui_prefs |= PREF_LARGE;
|
||||
@@ -1101,12 +1101,9 @@ static void setup(int s)
|
||||
case S_EUMUTATE: /* (V10.24) SEQ > MUTATE: the anchor above, a mutation below */
|
||||
song.sel = 0; set_engine_of(TSEL, ENGI_DRUM); go_title("EUCLID");
|
||||
eu_put(EK_HITS, 5);
|
||||
eu[0].mu[0] = 2; eu[0].mu[1] = 70; eu[0].mu[3] = 3;
|
||||
eu_mutate(0, &eu[0]);
|
||||
go_title("MUTATE");
|
||||
break;
|
||||
case S_NUDGE: /* (V10.25) STRETCH's NUDGE red: the cursor step 12/64 late */
|
||||
go_title("STRETCH"); ndg_step = 1; ui.cursor = 0;
|
||||
break; /* (V10.8.20: MUTATE gone; EUCLID's ring) */
|
||||
case S_NUDGE: /* (V10.8.20: STRETCH's NUDGE gone) a step 12/64 late, on NOTE */
|
||||
go_title("NOTE"); ui.cursor = 0;
|
||||
TSEL->step[0] = (step_t){{60}, 1, ST_NOTE, 0, 100};
|
||||
ST_MICRO_SET(&TSEL->step[0], 12);
|
||||
break;
|
||||
@@ -1489,7 +1486,7 @@ static void setup(int s)
|
||||
if (s == S_LENTE_BAR_LONG) /* (0.8.5) ALL TR at the right of the bars' strip */
|
||||
song.g[G_STRN] = -12;
|
||||
song.playing = 1; t->seq_idx = 21;
|
||||
nav_scene(SEC_SEQ, s == S_LENTE_PAT ? "LENGTH" : s == S_LENTE_STRETCH ? "STRETCH" : s == S_LENTE_BAR || s == S_LENTE_BAR_LONG ?
|
||||
nav_scene(SEC_SEQ, s == S_LENTE_PAT ? "LENGTH" : s == S_LENTE_STRETCH ? "PLAYHEADS" : s == S_LENTE_BAR || s == S_LENTE_BAR_LONG ?
|
||||
"STEP" : s == S_LENTE_STEP_COMP2 ? "COMP 2" : s == S_LENTE_STEP ? "NOTE" : s == S_SEQ_BAR ? "BAR" : "COMP"); /* (0.9.2: NOTE the roll; the
|
||||
* step large on COMP: TIE, REST, LONG there) */
|
||||
cursor_set(s == S_LENTE_STEP_TIE ? 35 : s == S_LENTE_STEP_REST ? 36 : s == S_LENTE_BAR_LONG || s == S_LENTE_STEP_LONG ? 40 : 34);
|
||||
|
||||
+32
-216
@@ -192,7 +192,6 @@ static void ui_power_on(void)
|
||||
mx_defaults();
|
||||
scn_on = 0; scn_keys = 0; /* (V10.25: SCENE off at power-on, its roles the defaults) */
|
||||
memset(eu, 0, sizeof eu); /* (EUCLID / MUTATE: the session's, none at power-on) */
|
||||
ndg_step = 0;
|
||||
memset(scn_role, 0, sizeof scn_role); sc_trk = 5;
|
||||
memset(&chain, 0, sizeof chain);
|
||||
chain_defaults(&chain_config);
|
||||
@@ -890,53 +889,10 @@ static int test_eumutate(void)
|
||||
if (m->step[i].time == ST_NOTE && m->step[i].n) { n++; c += (SCALE_MASK[2] >> (m->step[i].note[0] % 12u)) & 1u; }
|
||||
ok &= n == 4u * eu[1].l[0].h && c == n;
|
||||
bad += check("V10.16 VARY on a melody: four turns, the motif answered (notes in the key, HITS in each turn)", ok);
|
||||
go_title("MUTATE"); frame();
|
||||
ok = str_eq(cur_page()->title, "MUTATE") && cur_page()->graph == GR_EUCLID;
|
||||
{
|
||||
int16_t *v; const param_desc_t *pd = page_desc(cur_page(), 0, &v);
|
||||
ok &= pd && str_eq(pd->label, "EVERY") && *v == 0;
|
||||
pd = page_desc(cur_page(), 2, &v);
|
||||
ok &= pd && str_eq(pd->label, "MODE") && pd->fmt == F_ENUM && str_eq(pd->names[*v], "ORBIT");
|
||||
}
|
||||
{ /* EVERY 1 BAR, playing: the bar's last beat mutates (no UNDO point); stopped nothing */
|
||||
uint8_t anc[EU_ZN];
|
||||
uint32_t sig = mel_sig(m);
|
||||
turn(EN_K1, 1); frame();
|
||||
ok &= eu[1].mu[0] == 1u;
|
||||
memcpy(anc, eu_z[1], EU_ZN);
|
||||
eu_put(EK_U0 + 1u, 100); eu_put(EK_U0 + 3u, 3); /* AMOUNT 100, WHAT ALL */
|
||||
song.playing = 0; eu_tick();
|
||||
ok &= mel_sig(m) == sig;
|
||||
song.playing = 1; bar_n = 0; beat_n = 3; beat_pos = beat_samples() - 1u;
|
||||
undo_ok = 0; fm1_ms += 5000u;
|
||||
eu_tick();
|
||||
ok &= mel_sig(m) != sig && !undo_ok;
|
||||
sig = mel_sig(m);
|
||||
eu_tick(); /* (once a bar) */
|
||||
ok &= mel_sig(m) == sig;
|
||||
bar_n = 1; eu_tick();
|
||||
ok &= mel_sig(m) != sig && !memcmp(anc, eu_z[1], EU_ZN); /* (ORBIT: the anchor stays) */
|
||||
song.playing = 0; beat_n = 0;
|
||||
press(B_OCTDN); frame(); /* OCT-: back to the anchor */
|
||||
ok &= !memcmp((uint8_t *)&eu[1] + EU_Z0, anc, EU_ZN) && msg_is("ANCHOR");
|
||||
sig = mel_sig(m);
|
||||
press(B_OCTUP); frame(); /* OCT+: a mutation now, stopped too */
|
||||
ok &= mel_sig(m) != sig && msg_is("MUTATED");
|
||||
bad += check("V10.16 MUTATE: EVERY on the bar's last beat while playing (none stopped, once a bar, no UNDO point); OCT- the anchor, OCT+ now", ok);
|
||||
eu_put(EK_U0 + 2u, 2); /* PULSE: the anchor every second time */
|
||||
press(B_OCTDN); frame();
|
||||
sig = mel_sig(m);
|
||||
eu[1].flip = 0;
|
||||
press(B_OCTUP); frame(); ok = mel_sig(m) != sig;
|
||||
press(B_OCTUP); frame(); ok &= mel_sig(m) == sig;
|
||||
eu_put(EK_U0 + 2u, 1); /* DRIFT: from where it is (AMOUNT 100: HITS or ROTATE move) */
|
||||
press(B_OCTUP); frame(); press(B_OCTUP); frame(); press(B_OCTUP); frame();
|
||||
ok &= memcmp((uint8_t *)&eu[1] + EU_Z0, anc, EU_ZN) != 0 && !memcmp(anc, eu_z[1], EU_ZN);
|
||||
bad += check("V10.16 MUTATE's MODE: PULSE the anchor by turns, DRIFT walks on (the anchor kept)", ok);
|
||||
chain.running = 1; song.playing = 1; bar_n = 3; beat_n = 3;
|
||||
sig = mel_sig(m); eu_tick(); ok = mel_sig(m) == sig;
|
||||
chain.running = 0; song.playing = 0; beat_n = 0;
|
||||
bad += check("V10.16 MUTATE: not while a song's chain plays", ok);
|
||||
{ /* (V10.8.20, the owner) MUTATE gone: its page hidden (kept in the table: its index), its settings read by nothing */
|
||||
uint32_t i2, vis = 0;
|
||||
for (i2 = 0; i2 < NPAGES; i2++) if (PAGES[i2].id[0] == ID_MU0) vis |= (uint32_t)page_visible(i2);
|
||||
bad += check("V10.8.20 MUTATE gone: its page out of SEQ", !vis);
|
||||
}
|
||||
memset(eu, 0, sizeof eu);
|
||||
return bad;
|
||||
@@ -5551,9 +5507,8 @@ static int test_shift_page(void)
|
||||
ok = str_eq(cur_page()->title, "TRACK") && cur_page()->fam == FAM_SEQ && cur_page()->id[0] == P_POFS &&
|
||||
cur_page()->id[1] == P_TCHAN && cur_page()->id[2] == P_HVEL && cur_page()->id[3] == P_HRQ;
|
||||
turn(EN_K1, -2); frame();
|
||||
go_title("STRETCH"); frame();
|
||||
turn(EN_K4, 3); frame();
|
||||
bad += check("TRACK page: KNOB 1 PIT -2; STRETCH page: KNOB 4 ROTATE +3", ok && t->p[P_SOFS] == 3 && t->p[P_POFS] == -2);
|
||||
t->p[P_SOFS] = 3; /* (V10.8.20: STRETCH's page gone; ROTATE the SCL layer's KNOB 3, below) */
|
||||
bad += check("TRACK page: KNOB 1 PIT -2", ok && t->p[P_POFS] == -2);
|
||||
apply_preset_to(t, 1);
|
||||
bad += check(" a sound load keeps OFS and PIT (sequence settings)", t->p[P_SOFS] == 3 && t->p[P_POFS] == -2);
|
||||
ui_power_on();
|
||||
@@ -7794,44 +7749,44 @@ static int test_lente(void)
|
||||
{
|
||||
/* (2463a3b, 2026-11-04, FIT / SPAN: SEQ > LENGTH > RHYTHM after LENGTH; 92fc1d7, 2026-11-05: the GENERATE tab at the
|
||||
* end (LYRIC STEP only on a VOICE track): 14 pages in eight tabs, was 12 in seven) */
|
||||
static const char *const CH[14] = {"STEP", "LENGTH", "RHYTHM", "TRACK", "EUCLID", "MODES", "MUTATE", "PLAYHEADS", "STRETCH",
|
||||
"STEP FX", "STEP FX 2", "AUTOMATION", "AUTO LIST", "TRACK GEN"}; /* (V10.7.59: STEP FX,
|
||||
static const char *const CH[12] = {"STEP", "LENGTH", "RHYTHM", "TRACK", "EUCLID", "MODES", "PLAYHEADS",
|
||||
"STEP FX", "STEP FX 2", "AUTOMATION", "AUTO LIST", "TRACK GEN"}; /* (V10.8.20: MUTATE, STRETCH gone) */ /* (V10.7.59: STEP FX,
|
||||
* was COMP) (codex/coherence: TRACK
|
||||
* GEN, was GENERATE) */
|
||||
static const char *const TP[7] = {"LENGTH", "EUCLID", "PLAYHEADS", "STRETCH", "STEP FX", "AUTOMATION", "TRACK GEN"};
|
||||
static const char *const TP[6] = {"LENGTH", "EUCLID", "PLAYHEADS", "STEP FX", "AUTOMATION", "TRACK GEN"};
|
||||
int bad = 0, ok;
|
||||
uint32_t q, sig;
|
||||
ui_power_on();
|
||||
TSEL->p[P_SLEN] = 64;
|
||||
open_family(FAM_SEQ); frame();
|
||||
ok = str_eq(cur_page()->title, "STEP") && lens_level() == LV_BAR && roll_view(cur_page()) && lz_tabs() == 8u &&
|
||||
lz_tab_lit(0) && lz_crumb_is("SEQ \xB7 STEP \xB7 STEP") && lz_count_is("1/14");
|
||||
ok = str_eq(cur_page()->title, "STEP") && lens_level() == LV_BAR && roll_view(cur_page()) && lz_tabs() == 7u &&
|
||||
lz_tab_lit(0) && lz_crumb_is("SEQ \xB7 STEP \xB7 STEP") && lz_count_is("1/12");
|
||||
turn(EN_SELECT, -1); frames(32);
|
||||
ok &= str_eq(cur_page()->title, "STEP") && lz_count_is("1/14"); /* (the first: no wrap) */
|
||||
ok &= str_eq(cur_page()->title, "STEP") && lz_count_is("1/12"); /* (the first: no wrap) */
|
||||
turn(EN_SELECT, 1); frames(32);
|
||||
ok &= str_eq(cur_page()->title, "PATTERN") && seq_roll_view(cur_page()) && lz_tab_lit(1) && lz_count_is("2/14") &&
|
||||
ok &= str_eq(cur_page()->title, "PATTERN") && seq_roll_view(cur_page()) && lz_tab_lit(1) && lz_count_is("2/12") &&
|
||||
lz_crumb_is("SEQ \xB7 PATTERN \xB7 LENGTH"); /* (PATTERN, named LENGTH; codex/coherence:
|
||||
* its group PATTERN) */
|
||||
turn(EN_SELECT, 1); frames(32);
|
||||
ok &= str_eq(cur_page()->title, "RHYTHM") && lz_tab_lit(1) && lz_count_is("3/14");
|
||||
ok &= str_eq(cur_page()->title, "RHYTHM") && lz_tab_lit(1) && lz_count_is("3/12");
|
||||
turn(EN_SELECT, 1); frames(32);
|
||||
ok &= str_eq(cur_page()->title, "TRACK") && lz_tab_lit(1) && lz_count_is("4/14") &&
|
||||
ok &= str_eq(cur_page()->title, "TRACK") && lz_tab_lit(1) && lz_count_is("4/12") &&
|
||||
lz_crumb_is("SEQ \xB7 PATTERN \xB7 TRACK"); /* (TRACK under the PAT tab) */
|
||||
turn(EN_SELECT, 6); frames(32);
|
||||
ok &= str_eq(cur_page()->title, "COMP") && seq_roll_view(cur_page()) && lz_tab_lit(5) && lz_count_is("10/14") &&
|
||||
turn(EN_SELECT, 4); frames(32);
|
||||
ok &= str_eq(cur_page()->title, "COMP") && seq_roll_view(cur_page()) && lz_tab_lit(4) && lz_count_is("8/12") &&
|
||||
lz_crumb_is("SEQ \xB7 STEP FX \xB7 STEP FX");
|
||||
turn(EN_SELECT, 1); frames(32);
|
||||
ok &= str_eq(cur_page()->title, "COMP 2") && lz_tab_lit(5) && lz_count_is("11/14");
|
||||
bad += check("seq2 SEQ: enters at STEP (1/14, eight tabs); LENGTH the roll (seq2b), RHYTHM, TRACK under its tab, COMP the roll, COMP 2 after it", ok);
|
||||
bad += check("seq2 SEQ: one chain of 14 by SELECT (no wrap); a SEQ tap the next tab's first, round",
|
||||
chain_walk(B_SEQ, CH, 14, TP, 7));
|
||||
ok &= str_eq(cur_page()->title, "COMP 2") && lz_tab_lit(4) && lz_count_is("9/12");
|
||||
bad += check("seq2 SEQ: enters at STEP (1/12, seven tabs); LENGTH the roll (seq2b), RHYTHM, TRACK under its tab, COMP the roll, COMP 2 after it", ok);
|
||||
bad += check("seq2 SEQ: one chain of 12 by SELECT (no wrap); a SEQ tap the next tab's first, round",
|
||||
chain_walk(B_SEQ, CH, 12, TP, 6));
|
||||
{ /* (0.9.9-seq2b) every page of the chain the same picture: the bars' strip, the roll with its keys */
|
||||
static const char *const TI[12] = {"STEP", "PATTERN", "TRACK", "EUCLID", "MODES", "MUTATE", "PLAYHEADS", "STRETCH",
|
||||
static const char *const TI[10] = {"STEP", "PATTERN", "TRACK", "EUCLID", "MODES", "PLAYHEADS",
|
||||
"COMP", "COMP 2", "AUTOMATION", "AUTO LIST"};
|
||||
ui_power_on(); TSEL->p[P_SLEN] = 64;
|
||||
open_family(FAM_SEQ); frame();
|
||||
ok = 1;
|
||||
for (q = 0; q < 12u; q++) {
|
||||
for (q = 0; q < 10u; q++) {
|
||||
go_title(TI[q]); frame();
|
||||
memset(host_screen, 0, sizeof host_screen); ui.force = 1; ui_draw();
|
||||
ok &= str_eq(cur_page()->title, TI[q]) && seq_roll_view(cur_page()) && lens_strip() &&
|
||||
@@ -7929,7 +7884,7 @@ static int test_lente(void)
|
||||
go_title("BAR"); frames(32);
|
||||
turn(EN_K1, 1);
|
||||
ok &= ui.bank == 1u;
|
||||
turn(EN_SELECT, 8); frames(32); /* (from BAR, LENGTH's place: COMP; V10.16: past MUTATE;
|
||||
turn(EN_SELECT, 6); frames(32); /* (from BAR, LENGTH's place: COMP; V10.8.20: MUTATE, STRETCH gone;
|
||||
* 2463a3b: past RHYTHM) */
|
||||
ok &= seq_roll_view(cur_page()) && lens_level() == LV_STEP;
|
||||
bad += check(" DRUM: STEP is the grid (its keys); LENGTH the grid (seq2b), BAR (by code) KNOB 1 the bar; COMP the grid", ok);
|
||||
@@ -8112,7 +8067,7 @@ static int test_foot_steps(void)
|
||||
|
||||
static int test_seq_tools(void)
|
||||
{
|
||||
static const uint8_t PG[8] = {GR_ROLL, GR_STEPS, GR_CHANCE, GR_MOTION, GR_SHAPE, GR_FUGUE, GR_EUCLID, GR_COMP};
|
||||
static const uint8_t PG[7] = {GR_ROLL, GR_STEPS, GR_CHANCE, GR_MOTION, GR_FUGUE, GR_EUCLID, GR_COMP}; /* (V10.8.20: STRETCH gone) */
|
||||
static const uint8_t NOT[4] = {GR_PATS, GR_SONG, GR_TRK, 0};
|
||||
int bad = 0, ok, okc, flash;
|
||||
uint32_t i, k, a, b2, pg, seed;
|
||||
@@ -8120,7 +8075,7 @@ static int test_seq_tools(void)
|
||||
|
||||
/* where it opens: (0.8.3) every LENTE page; elsewhere SEQ held is a tap (SONG: SAVE held, G5) */
|
||||
ok = 1;
|
||||
for (i = 0; i < 8u; i++) {
|
||||
for (i = 0; i < 7u; i++) {
|
||||
ui_power_on();
|
||||
go_page(PG[i]); frame();
|
||||
pg = ui.page;
|
||||
@@ -8147,7 +8102,7 @@ static int test_seq_tools(void)
|
||||
ui_power_on();
|
||||
go_page(GR_ROLL); frame();
|
||||
{ /* (0.9.2) a tap on STEP: the next tab's first (seq2: LENGTH MUTATE PLAYHEADS STRETCH COMP AUTOMATION, round) */
|
||||
static const char *const ORD[] = {"PATTERN", "EUCLID", "PLAYHEADS", "STRETCH", "COMP", "AUTOMATION"};
|
||||
static const char *const ORD[] = {"PATTERN", "EUCLID", "PLAYHEADS", "COMP", "AUTOMATION"};
|
||||
uint32_t q;
|
||||
ok = 1;
|
||||
for (q = 0; q < sizeof ORD / sizeof ORD[0]; q++) {
|
||||
@@ -8161,88 +8116,7 @@ static int test_seq_tools(void)
|
||||
bad += test_foot_steps();
|
||||
bad += test_copy_paste();
|
||||
bad += test_save_lens();
|
||||
{ /* (0.6.85) SEQ > STRETCH: x2 .. x8 / 2 .. / 8 (the notes spread, held ones held), REPEAT x2 .. x8 / TO 64, NUDGE */
|
||||
track_t *t;
|
||||
uint32_t i, ok2 = 1, ok3 = 1, ok4 = 1, ok5;
|
||||
ui_power_on(); stop_transport();
|
||||
song.sel = 0; t = &trk[0];
|
||||
for (i = 0; i < NSTEP; i++) step_clear(&t->step[i]);
|
||||
motion_clear(t);
|
||||
t->p[P_SLEN] = 4; /* C D E G, the D held a step (N T) */
|
||||
t->step[0].time = ST_NOTE; t->step[0].n = 1; t->step[0].note[0] = 60; t->step[0].vel = 100;
|
||||
t->step[1].time = ST_NOTE; t->step[1].n = 1; t->step[1].note[0] = 62; t->step[1].vel = 100;
|
||||
t->step[2].time = ST_TIE;
|
||||
t->step[3].time = ST_NOTE; t->step[3].n = 1; t->step[3].note[0] = 67; t->step[3].vel = 100;
|
||||
(void)motion_put(t, 3, P_FCUT, 20, 0);
|
||||
go_page(GR_SHAPE); frame();
|
||||
shp_i = 7u; shp_r = 0u; shp_base.valid = 0; /* (x1, OFF: whatever an earlier test turned) */
|
||||
ok = str_eq(cur_page()->title, "STRETCH");
|
||||
turn(EN_K1, 1); turn(EN_K1, 1); /* x1 -> x2 -> x3, done as it turns (0.6.92), from the base */
|
||||
ok &= shp_k() == 3 && !ui.act;
|
||||
ok &= t->p[P_SLEN] == 12 && t->step[0].note[0] == 60 && t->step[3].note[0] == 62 && t->step[9].note[0] == 67;
|
||||
for (i = 4; i < 9u; i++) ok2 &= t->step[i].time == ST_TIE; /* the D held through its old TIE */
|
||||
ok2 &= t->step[1].time == ST_REST && t->step[10].time == ST_REST; /* the short ones stay short */
|
||||
ok2 &= motion.count == 1u && MOTION_STEP(&motion.event[0]) == 9u; /* the lock went with its step */
|
||||
if (!(ok && ok2)) { printf(" len %d mc %u ms %u |", t->p[P_SLEN], motion.count, motion.count ? MOTION_STEP(&motion.event[0]) : 99u);
|
||||
for (i = 0; i < 12u; i++) printf(" %u:%u", t->step[i].time, t->step[i].note[0]); printf("\n"); }
|
||||
bad += check("STRETCH x3: LEN 4 > 12, each step three apart, a held note held, its lock along", ok && ok2);
|
||||
turn(EN_K1, -1); turn(EN_K1, -1); /* back to x1: the base again */
|
||||
ok = t->p[P_SLEN] == 4 && t->step[3].note[0] == 67 && motion.count == 1u && MOTION_STEP(&motion.event[0]) == 3u;
|
||||
bad += check(" back to x1: the sequence as it was before (the base), its lock too", ok);
|
||||
turn(EN_K1, 1); /* x2 */
|
||||
ok = !undo_do() && t->p[P_SLEN] == 4 && t->step[3].note[0] == 67 && MOTION_STEP(&motion.event[0]) == 3u;
|
||||
bad += check(" UNDO: the sequence back as it was", ok);
|
||||
t->p[P_SLEN] = 8; /* eight steps: C . D T E . G . (edited: a new base) */
|
||||
t->step[4] = t->step[3]; t->step[4].note[0] = 64; t->step[3].time = ST_REST; t->step[6] = t->step[4]; t->step[6].note[0] = 67;
|
||||
motion_clear(t);
|
||||
shp_i = 7u;
|
||||
turn(EN_K1, -1); /* /2 */
|
||||
ok3 = t->p[P_SLEN] == 4 && t->step[0].note[0] == 60 && t->step[1].note[0] == 62 && t->step[2].note[0] == 64 &&
|
||||
t->step[3].note[0] == 67 && t->step[4].time == ST_REST;
|
||||
bad += check("STRETCH /2: LEN 8 > 4, the first note of each pair", ok3);
|
||||
turn(EN_K1, 1); /* (x1: the eight back) */
|
||||
t->p[P_SLEN] = 4; /* (edited: four steps, a lock) */
|
||||
for (i = 4; i < NSTEP; i++) step_clear(&t->step[i]);
|
||||
motion_clear(t);
|
||||
(void)motion_put(t, 1, P_FCUT, 30, 0);
|
||||
shp_r = 0u;
|
||||
turn(EN_K2, 1); turn(EN_K2, 1); /* OFF -> x2 -> x3 */
|
||||
ok4 = shp_rep() == 3u && t->p[P_SLEN] == 12;
|
||||
for (i = 4; i < 12u; i++) ok4 &= t->step[i].time == t->step[i % 4u].time && t->step[i].note[0] == t->step[i % 4u].note[0];
|
||||
ok4 &= motion.count == 3u && t->step[12].time == ST_REST;
|
||||
if (!ok4) printf(" rep len %d mc %u\n", t->p[P_SLEN], motion.count);
|
||||
while (shp_r != 8u) turn(EN_K2, 1); /* TO 64 (from the base of four) */
|
||||
ok4 &= t->p[P_SLEN] == 64 && t->step[63].note[0] == t->step[3].note[0] && motion.count == 16u;
|
||||
for (i = 0; i < 8u; i++) turn(EN_K2, -1); /* OFF: the four back */
|
||||
ok4 &= t->p[P_SLEN] == 4 && motion.count == 1u;
|
||||
bad += check("REPEAT x3: 4 steps > 12, their locks copied; TO 64: whole copies (4 > 64); OFF: the base back", ok4);
|
||||
{ /* (0.6.96) the other knob's result is the base: REPEAT x2 (4 > 8), then STRETCH x2 stretches the eight (> 16),
|
||||
* STRETCH x1 back to the eight; REPEAT again then takes the stretched result as its base */
|
||||
int ok6;
|
||||
shp_r = 0u; shp_i = 7u;
|
||||
turn(EN_K2, 1); /* x2: 8 */
|
||||
ok6 = t->p[P_SLEN] == 8;
|
||||
turn(EN_K1, 1); /* STRETCH x2 over the repeats: 16 */
|
||||
ok6 &= t->p[P_SLEN] == 16 && t->step[8].note[0] == t->step[0].note[0];
|
||||
if (!ok6) printf(" after stretch: len %d n8 %d n0 %d\n", t->p[P_SLEN], t->step[8].note[0], t->step[0].note[0]);
|
||||
turn(EN_K1, -1); /* x1: the eight back (not the four) */
|
||||
ok6 &= t->p[P_SLEN] == 8 && shp_r == 0u;
|
||||
if (!ok6) printf(" after x1: len %d shp_r %u\n", t->p[P_SLEN], shp_r);
|
||||
turn(EN_K1, 1); turn(EN_K2, 1); /* x2 again (16), then REPEAT x2 from the sixteen: 32 */
|
||||
ok6 &= t->p[P_SLEN] == 32 && t->step[16].time == t->step[0].time;
|
||||
if (!ok6) printf(" stretch over repeat: len %d\n", t->p[P_SLEN]);
|
||||
bad += check("STRETCH over REPEAT (0.6.96): the other knob's result is the base; the same knob keeps its own", ok6);
|
||||
}
|
||||
t->p[P_SLEN] = 4;
|
||||
for (i = 4; i < NSTEP; i++) step_clear(&t->step[i]);
|
||||
motion_clear(t); shp_r = 0u; shp_i = 7u;
|
||||
ok5 = t->step[0].note[0] == 60;
|
||||
turn(EN_K3, 1);
|
||||
ok5 &= t->step[1].note[0] == 60 && t->step[0].note[0] == 67 && t->p[P_SLEN] == 4;
|
||||
turn(EN_K3, -1);
|
||||
ok5 &= t->step[0].note[0] == 60;
|
||||
bad += check("NUDGE: KNOB 3 moves the sequence a step right / left at once", ok5);
|
||||
}
|
||||
/* (V10.8.20, the owner) SEQ > STRETCH gone (STRETCH, REPEAT, NUDGE, ROTATE): its tests with it */
|
||||
{ /* (0.6.37) SHIFT: OFFSET PITCH CHANCE, the last SEQ page; CHANCE 0 skips every step, 100 % (stored 0) none */
|
||||
char v[12]; const char *u; step_t st; track_t *t3 = &trk[0];
|
||||
ui_power_on(); go_title("TRACK"); frame();
|
||||
@@ -12925,7 +12799,7 @@ static const old_lv_t OLD_LV[] = {
|
||||
{FAM_GLO, 0, 9, {"MIXER", "SENDS"}}, {FAM_GLO, 1, 9, {"GLOBAL"}}, {FAM_GLO, 2, 9, {"SYSTEM", "SYSTEM 2"}},
|
||||
{FAM_SAVE, SV_LIB, 9, {"PROJECT", "TOOLS"}}, {FAM_SAVE, SV_PROJ, 9, {"PROJECT", "ARRANGE"}},
|
||||
{FAM_SAVE, SV_SOUND, 9, {"USER", "PRESETS"}},
|
||||
{FAM_SEQ, LV_PAT, 9, {"PATTERN", "STRETCH", "PLAYHEADS", "TRACK", "EUCLID"}}, /* (seq2: BAR, NOTE out of the chain) */
|
||||
{FAM_SEQ, LV_PAT, 9, {"PATTERN", "PLAYHEADS", "TRACK", "EUCLID"}}, /* (seq2: BAR, NOTE out of the chain) */
|
||||
{FAM_SEQ, LV_BAR, 9, {"STEP", "AUTOMATION", "AUTO LIST"}},
|
||||
{FAM_SEQ, LV_STEP, 9, {"COMP", "COMP 2"}}, /* (NOTE's STEP view: merged into BAR's, the mock-up's "páginas repetidas") */
|
||||
{FAM_FX, FXL_TRACK, 9, {"FX", "DIST", "AUTO PAN"}}, {FAM_FX, FXL_BUSES, 9, {"BUSES"}},
|
||||
@@ -13164,7 +13038,7 @@ static void tk_start(uint32_t from) /* 0 home, 1 seq, 2 fxdl
|
||||
}
|
||||
static int test_nav_tasks(void)
|
||||
{
|
||||
static const uint8_t WANT[14] = {4, 3, 5, 6, 4, 9, 9, 2, 3, 1, 4, 7, 19, 5}; /* (V10.8: task 5 by PRESETS, two fast turns) */ /* (V10.7.63: task 11 a detent less) */ /* (V10.7.63: task 5 a SAVE tap less) */ /* (2463a3b, 2026-11-04: SEQ > LENGTH >
|
||||
static const uint8_t WANT[14] = {4, 3, 5, 6, 4, 9, 9, 2, 3, 1, 4, 7, 17, 5}; /* (V10.8.20: task 13 two detents less) */ /* (V10.8: task 5 by PRESETS, two fast turns) */ /* (V10.7.63: task 11 a detent less) */ /* (V10.7.63: task 5 a SAVE tap less) */ /* (2463a3b, 2026-11-04: SEQ > LENGTH >
|
||||
* RHYTHM between LENGTH and TRACK: tasks 11 and 13 a detent more) */ /* (V10.37: COMPS before GLOBAL, SYSTEM a tap further) */ /* (V10.1: SAVE composes first, 106 -> 108) */ /* (seq2: task 5 by STEP's KNOB 1, no BAR;
|
||||
* task 11 TRACK under LEN's tab; task 13 eight detents (seq2c:
|
||||
* MUTATE 2); was 73) */
|
||||
@@ -13236,7 +13110,7 @@ static int test_nav_tasks(void)
|
||||
ok = song.sel == 3u && str_eq(cur_page()->title, "SOUND") && c == 1u && dv[DXP_DECAY] != d0; }
|
||||
break;
|
||||
case 12: /* COMP 2 of step 9 */
|
||||
tk_start(1); tk_go(EN_PRESET, 8); tk_go(EN_SELECT, 10); tk_val(EN_K1, 1); /* (2463a3b: RHYTHM, ten) */ /* (seq2c: eight detents to COMP 2, V10.16 nine;
|
||||
tk_start(1); tk_go(EN_PRESET, 8); tk_go(EN_SELECT, 8); tk_val(EN_K1, 1); /* (2463a3b: RHYTHM, ten; V10.8.20: MUTATE, STRETCH gone, eight) */ /* (seq2c: eight detents to COMP 2, V10.16 nine;
|
||||
* seq2d: the step picked on STEP, KNOB 1 its ACTION) */
|
||||
ok = str_eq(cur_page()->title, "COMP 2") && ui.cursor == 8u && TSEL->step[8].comp2 != 0u;
|
||||
break;
|
||||
@@ -13255,7 +13129,7 @@ static int test_nav_tasks(void)
|
||||
}
|
||||
printf("ui: the race: %u %u %u %u %u %u %u %u %u %u %u %u %u %u = %u actions (0.9.1: 75)\n", got[0], got[1], got[2], got[3],
|
||||
got[4], got[5], got[6], got[7], got[8], got[9], got[10], got[11], got[12], got[13], tot);
|
||||
bad += check("0.9.2 the mock-up's 14 tasks on the panel: each goal reached in its PROPOSED actions (seq2c: 106, was 73)", okall && tot == 81u); /* (V10.8: task 5 by PRESETS, 34 -> 4) */ /* (2463a3b RHYTHM: +2) */ /* (V10.8: an accent past VEL 127: +1; V10.16 MUTATE in SEQ's chain: +1) */
|
||||
bad += check("0.9.2 the mock-up's 14 tasks on the panel: each goal reached in its PROPOSED actions (seq2c: 106, was 73)", okall && tot == 79u); /* (V10.8.20: MUTATE, STRETCH out of SEQ's chain: -2) */ /* (V10.8: task 5 by PRESETS, 34 -> 4) */ /* (2463a3b RHYTHM: +2) */ /* (V10.8: an accent past VEL 127: +1; V10.16 MUTATE in SEQ's chain: +1) */
|
||||
ui_power_on();
|
||||
return bad;
|
||||
}
|
||||
@@ -13649,63 +13523,6 @@ static int test_chord_peek(void)
|
||||
return check("CHORD LEAD: the CHORD page on screen does not change the next key's chord (V10.27)", na == nb && !memcmp(a, b, na));
|
||||
}
|
||||
/* (V10.25) SEQ > STRETCH's NUDGE: OCT- the whole sequence a step (blue), OCT+ the cursor step's MICRO timing (red) */
|
||||
static int test_nudge_micro(void)
|
||||
{
|
||||
int ok;
|
||||
track_t *t;
|
||||
ui_power_on();
|
||||
song.sel = 1; t = TSEL;
|
||||
my_steps(t);
|
||||
go_title("STRETCH"); frame();
|
||||
ui.cursor = 0;
|
||||
t->step[0] = (step_t){{60}, 1, ST_NOTE, 0, 100};
|
||||
press(B_OCTUP);
|
||||
ok = ndg_step == 1u;
|
||||
turn(EN_K3, 1); turn(EN_K3, 1); turn(EN_K3, 1);
|
||||
ok &= ST_MICRO(&t->step[0]) == 3 && t->step[0].note[0] == 60;
|
||||
turn(EN_K3, -1);
|
||||
ok &= ST_MICRO(&t->step[0]) == 2;
|
||||
press(B_OCTDN);
|
||||
ok &= ndg_step == 0u;
|
||||
turn(EN_K3, 1);
|
||||
ok &= t->step[1].note[0] == 60 && ST_MICRO(&t->step[1]) == 2; /* (the sequence a step right, its MICRO with it) */
|
||||
ok = check("NUDGE: OCT+ the step's MICRO (64ths), OCT- the whole sequence a step (V10.25)", ok) == 0;
|
||||
{ /* (V10.7.4) OCT+ again: the cursor step moved a step; a note moves with its TIEs (its length), the locks with it,
|
||||
* the neighbour's note keeps its own; UNDO puts it back */
|
||||
uint32_t i;
|
||||
int16_t lv;
|
||||
step_t keep[NSTEP];
|
||||
int ok2;
|
||||
ui_power_on();
|
||||
song.sel = 1; t = TSEL;
|
||||
for (i = 0; i < NSTEP; i++) step_clear(&t->step[i]);
|
||||
t->p[P_SLEN] = 16;
|
||||
t->step[1] = (step_t){{64}, 1, ST_NOTE, 0, 100};
|
||||
t->step[2] = (step_t){{60}, 1, ST_NOTE, 0, 100};
|
||||
t->step[3].time = ST_TIE; t->step[3].vel = 100;
|
||||
(void)motion_set_lock(t, 2, P_PAN, 20);
|
||||
memcpy(keep, t->step, sizeof keep);
|
||||
go_title("STRETCH"); frame();
|
||||
ui.cursor = 2;
|
||||
press(B_OCTUP); press(B_OCTUP);
|
||||
ok2 = ndg_step == 2u;
|
||||
turn(EN_K3, 1); frame();
|
||||
ok2 &= t->step[1].time == ST_NOTE && t->step[1].note[0] == 64 && t->step[2].time == ST_REST &&
|
||||
t->step[3].time == ST_NOTE && t->step[3].note[0] == 60 && t->step[4].time == ST_TIE &&
|
||||
t->step[5].time == ST_REST && ui.cursor == 3u;
|
||||
ok2 &= motion_lock_get(t, 3, P_PAN, &lv) && lv == 20 && !motion_lock_get(t, 2, P_PAN, &lv);
|
||||
(void)undo_do(); frame();
|
||||
ok2 &= !memcmp(keep, t->step, sizeof keep) && motion_lock_get(t, 2, P_PAN, &lv) && lv == 20; /* (UNDO: as before) */
|
||||
ui.cursor = 2;
|
||||
turn(EN_K3, -1); frame(); /* (left: past the note at 1, which keeps its length) */
|
||||
ok2 &= t->step[1].time == ST_NOTE && t->step[1].note[0] == 60 && t->step[2].time == ST_TIE &&
|
||||
t->step[3].time == ST_NOTE && t->step[3].note[0] == 64 && t->step[4].time == ST_REST && ui.cursor == 1u;
|
||||
ok2 &= motion_lock_get(t, 1, P_PAN, &lv) && lv == 20;
|
||||
if (!ok2) for (i = 0; i < 6u; i++) printf(" step %u: time %u note %u\n", i, t->step[i].time, t->step[i].note[0]);
|
||||
ok &= !check("NUDGE: OCT+ again moves the cursor step (V10.7.4): a note with its TIEs and its locks, the neighbour whole", ok2);
|
||||
}
|
||||
return !ok;
|
||||
}
|
||||
/* (V10.25) SCL > SCENE: one key plays every track given a role (T6 CHORD a triad, T5 BASS an octave down, T2 LEAD an
|
||||
* octave up, T4 ARP the chord into its arp); the kit and KEEP tracks are not reached; the key up ends them all; REC
|
||||
* records every role's track */
|
||||
@@ -13970,7 +13787,6 @@ int main(void)
|
||||
bad += test_string_excite();
|
||||
bad += test_presets_back();
|
||||
bad += test_scene();
|
||||
bad += test_nudge_micro();
|
||||
bad += test_chord_peek();
|
||||
bad += test_slower();
|
||||
bad += test_large_face();
|
||||
|
||||
+2243
-2248
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user