V10.8.69: GEN with JIANT BYTE's song plans; the drums' punch back

Juan: the drums had less force, and BYTE's results are more interesting.
From JIANT BYTE 5aebdf56 (byte-cpu-light = main; the generator as of
2253f35b), with FM's engines, kits and sounds kept:
- gsong: SONG and PARTS pick a template by the genre's family, throw its
  rows, fit the piece to two to five minutes and place the fills (FUGA's
  template is left out: that genre is gone from FM)
- every melodic part's timbre (E6) moves over its loop in each section,
  and goes back in the break
- gen_post as BYTE has it: no call and response, no EXPLORE cut
- the drums back to V10.8.67: kit DECAY and DRIVE, the heavy kits' DIST,
  DANCE's drive and level, the bass level, the HARD BASS, TRIBAL and EBM
  GMIX; CLIP as BYTE has it (60..85 heavy, 35..65)
- GTRIM: HARD BASS and KRAUT 1 dB lower (DANCE pieces stay under -1 dBFS)
Not ported for lack of flash: grich (automation, locks and components
for each section, about 900 B). gfugue doesn't apply (no FUGA in FM).

Flash: the UI and VOICE name lists are packed (str_nth): MENU, MATRIX,
step components, lens hints, row variations, sections, punch-in, panel,
scat. gjazz now lives in the BT segment. Image: 128 B free; BT: 20 B free.

Merged codex/usbhost-fix (81582f8f): the USB host parser accepts an
OUT-only MIDI interface ahead of the IN one, interrupt IN with
bInterval 0, and bulk sizes from 4 to 64. The probe retries 3 times with
a bus reset and a longer recovery, and waits 20 ms after SET_ADDRESS.
tests/usb_host_desc_test.c is added to CI. The layout was recorded again.

Tests: gen_entry MID recorded again. gen_test is back to V10.8.67's
strictness (RMS -21.0, at most 4 parts over the drums, heavy DIST >= 40).

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-27 23:49:04 +00:00
commit 58e51ae25c
28 files changed
+2600 -2438

No files matched your search

+2
View File
@@ -78,6 +78,8 @@ jobs:
build/song-check/key-trk | tee build/song-check/key-trk.log
cc -O1 -w -Ibuild/gen -Ifirmware/src tests/west_test.c -lm -o build/song-check/west
build/song-check/west | tee build/song-check/west.log
cc -O1 -w -fsanitize=address,bounds tests/usb_host_desc_test.c -o build/song-check/usbhost
build/song-check/usbhost | tee build/song-check/usbhost.log
for test in audio perform upreset; do
cc -O1 -w -Wno-implicit-function-declaration -Ibuild/gen -Ifirmware/src tests/${test}_test.c -lm -o build/song-check/$test
build/song-check/$test | tee build/song-check/$test.log
+1 -1
View File
@@ -81,7 +81,7 @@ static int ed_menu_handle(uint32_t cmd, const uint8_t *a, uint32_t n)
ed_v((int32_t)menu_get(row));
ed_v(0);
ed_v((int32_t)k - 1);
ed_str(MI_NAME[row], 12);
ed_str(str_nth(MI_NAME, row), 12);
for (i = 0; i < k; i++)
ed_str(menu_vname(row, i), 12);
ed_b(MI_TAB[row]); /* (after the names: an older editor stops before it) */
+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.68" /* (2026-11-27) V10.8.68 (the owner: "BYTE tiene un mejor generador de canciones"): GEN as JIANT BYTE 09ec6b57 / 77f2b602 / 12b70fd0: the mix rebalanced (MOOD in the levels, DANCE's drums under the rest, softer kit drive, five genres' GMIX), CALM longer sections, slower RADIO, longer tails and sends, held chords, EXPLORE's field, voices and scales widened, the build's DJ FILTER a swept low-pass, NEO CLASSIC without drums; VISUAL back on its page whole (its hits taken as they are, nothing of it run away); V10.8.67 (the owner: "tratemos de darle onda a las nuestras con poco. Usaría las gráficas de FX, ENVELOPE, LFO, las de HOME, ANIMAL haciendo el morph, pero deformadas, repetidas, rotas"): HOME > VISUAL and the saver draw the system's own pictures (DELAY REVERB CHORUS DIST MASTER, ENV, the LFO, ECO, a being, ANIMAL morphing) through one map: deformed (warp, twist, polar, fold), repeated (kaleidoscope, stutter, trail, tiles), broken (strips, gaps, tears, blocks), each segment swimming, still at rest; a fixed budget of points a frame, drawn less often and simpler while the sound is busy; V10.8.66 (the owner: "aplicá lo de BYTE"): MATH's LOOP with WAVE SYNC in the song's divisions (4 BAR 2 BAR 1 BAR 1/2 1/4 1/8 1/16 1/32, JIANT BYTE 68b546c9's loopq), the note's t from 0 at each window, aligned to the transport; V10.8.65 (the owner: "cuánto se puede agrandar el nombre de lo que hace la página"; "LIFE tiene PAN y no se ve que dice LIFE"): a page with no picture of its own its name large (GLOBAL, KEY SPLIT 1/2, LEVEL, PUNCH IN, the four CLAY pages), LIFE / MACROS' beings under their name, a knob turned said on the footer with its page ("LIFE FILTER 40", "LFO RATE ..."); V10.8.64 (the owner: "la página de macros en HOME con DICE"; "LIFE: PUMP por STEREO"; "todo en 100 mucho más extremo"; "LIFE en grande"): HOME > MACROS back (ECO's third page, M1..M4 the FX layer's own; HOME + SELECT DICE MACROS, one UNDO); LIFE STEREO (each track pushed across the field by its neighbours, two playing apart; was PUMP) and every LIFE depth curved past 60 (at 100 about 2.5 times); LIFE and MACROS named large; V10.8.63 V10.8.63 (the owner: "dale implementalo"; a user's report: the late-2026 units' panel washed out): MENU > DISPLAY > PANEL AUTO / A / B: A today's ST7789 set-up as it was, B the datasheet's power, VCOM and gamma registers and INVOFF after it (untested on that panel), AUTO B on flash 0xB36014; applied at once ("PANEL B"); OCT- + SAVE held at power-on: A for that start; V10.8.62 (a user: "the bpm is not the same from a note to another"): MATH WAVE SYNC (the time locked): BYTE's rhythm (the formula's slow bits) from the tempo, its pitch (the fast bits) the note's, every key the same pattern in time (120 BPM: C4's as before), chosen on WAVE, a new preset BYTE SYNC (BYTEBEAT with it; the factory presets and GEN's picks as they were); V10.8.61 (the owner: "están mucho mejor las visuales"): VISUAL from the system's own beings (the song's tracks' creatures, huge, fused and morphing through one field: WHEEL's worms' wave, a twist, breathing lobes, a melt, a fold; the scope's thread; kick, snare, hats and notes), VOICE's tract or ANIMAL's morph fused in one scene in three whatever the engines; V10.8.60 (the owner: "dale", JIANT BYTE's CPU technique: the FM-1's time a block goes by the flash's 32-byte lines the sound reads): the USB resampler's table halved (its history kept newest first too), its 7.5 KiB the RAM code's: a voice's block, the matrix, the FILTER, the split and the drums' sides in RAM; core 1's parts from the RAM copy; the expression keys' pass not run for a kit; the lines model (tests/cpu_lines_test.py, tools/audio_map.txt); V10.8.59 (the owner: "una visual por canción, muy audio reactiva, todas deformadas y fusionadas"; SCL simplified and PER1/PER2 settings no longer read for the room): VISUAL from the song (GEN seed, genre, mood, energy; else the project), hits (kick jump and thump, snare glitch, note lobes), one field bends every layer; V10.8.58 (the owner: "veamos qué se puede hacer con menos espacio"): VISUAL composed in the same room: the data a few boxes apart with their callouts, a head with crown, temples, cheekbones, jaw and neck (no egg), WHEEL's worms in some scenes on the other third, the core and the ground placed and sized by the seed, the mesh or its rows alone (topographic), the skull's spokes with square tips, PALETTE every layer (MIXED: one of three duos a scene); V10.8.57 (the owner: "podría ser mucho mejor", references "anatomía cibernética y data", "una mezcla de todo eso", the whole screen, no shape at several sizes): HOME > VISUAL the whole screen (a knob a line at the foot), a composition from a seed: a ground (an isometric mesh of the output's history with digits, stars out of a vanishing point, a rain of glyphs), WHEEL's worms, a core on a third (a radial skull diagram, a scanned head with its thermal scan lines, or a creature), the data (trLine truncated
#define FELUCCA_VERSION "V10.8.69" /* (2026-11-27) V10.8.69 (the owner: "las baterías tienen menos fuerza ... los resultados de BYTE son mucho más interesantes"): GEN with JIANT BYTE 5aebdf56's song plans (gsong: templates by the genre's family, rows thrown, two to five minutes, the fills placed), its sections' timbre moving over each loop, its gen_post (no call and response, no EXPLORE cut), FM's engines and sounds; the kits' punch, drive and CLIP back to V10.8.67's, HARD BASS and KRAUT 1 dB of headroom more; UI and VOICE name lists packed (str_nth) for the flash; V10.8.68 (the owner: "BYTE tiene un mejor generador de canciones"): GEN as JIANT BYTE 09ec6b57 / 77f2b602 / 12b70fd0: the mix rebalanced (MOOD in the levels, DANCE's drums under the rest, softer kit drive, five genres' GMIX), CALM longer sections, slower RADIO, longer tails and sends, held chords, EXPLORE's field, voices and scales widened, the build's DJ FILTER a swept low-pass, NEO CLASSIC without drums; VISUAL back on its page whole (its hits taken as they are, nothing of it run away); V10.8.67 (the owner: "tratemos de darle onda a las nuestras con poco. Usaría las gráficas de FX, ENVELOPE, LFO, las de HOME, ANIMAL haciendo el morph, pero deformadas, repetidas, rotas"): HOME > VISUAL and the saver draw the system's own pictures (DELAY REVERB CHORUS DIST MASTER, ENV, the LFO, ECO, a being, ANIMAL morphing) through one map: deformed (warp, twist, polar, fold), repeated (kaleidoscope, stutter, trail, tiles), broken (strips, gaps, tears, blocks), each segment swimming, still at rest; a fixed budget of points a frame, drawn less often and simpler while the sound is busy; V10.8.66 (the owner: "aplicá lo de BYTE"): MATH's LOOP with WAVE SYNC in the song's divisions (4 BAR 2 BAR 1 BAR 1/2 1/4 1/8 1/16 1/32, JIANT BYTE 68b546c9's loopq), the note's t from 0 at each window, aligned to the transport; V10.8.65 (the owner: "cuánto se puede agrandar el nombre de lo que hace la página"; "LIFE tiene PAN y no se ve que dice LIFE"): a page with no picture of its own its name large (GLOBAL, KEY SPLIT 1/2, LEVEL, PUNCH IN, the four CLAY pages), LIFE / MACROS' beings under their name, a knob turned said on the footer with its page ("LIFE FILTER 40", "LFO RATE ..."); V10.8.64 (the owner: "la página de macros en HOME con DICE"; "LIFE: PUMP por STEREO"; "todo en 100 mucho más extremo"; "LIFE en grande"): HOME > MACROS back (ECO's third page, M1..M4 the FX layer's own; HOME + SELECT DICE MACROS, one UNDO); LIFE STEREO (each track pushed across the field by its neighbours, two playing apart; was PUMP) and every LIFE depth curved past 60 (at 100 about 2.5 times); LIFE and MACROS named large; V10.8.63 V10.8.63 (the owner: "dale implementalo"; a user's report: the late-2026 units' panel washed out): MENU > DISPLAY > PANEL AUTO / A / B: A today's ST7789 set-up as it was, B the datasheet's power, VCOM and gamma registers and INVOFF after it (untested on that panel), AUTO B on flash 0xB36014; applied at once ("PANEL B"); OCT- + SAVE held at power-on: A for that start; V10.8.62 (a user: "the bpm is not the same from a note to another"): MATH WAVE SYNC (the time locked): BYTE's rhythm (the formula's slow bits) from the tempo, its pitch (the fast bits) the note's, every key the same pattern in time (120 BPM: C4's as before), chosen on WAVE, a new preset BYTE SYNC (BYTEBEAT with it; the factory presets and GEN's picks as they were); V10.8.61 (the owner: "están mucho mejor las visuales"): VISUAL from the system's own beings (the song's tracks' creatures, huge, fused and morphing through one field: WHEEL's worms' wave, a twist, breathing lobes, a melt, a fold; the scope's thread; kick, snare, hats and notes), VOICE's tract or ANIMAL's morph fused in one scene in three whatever the engines; V10.8.60 (the owner: "dale", JIANT BYTE's CPU technique: the FM-1's time a block goes by the flash's 32-byte lines the sound reads): the USB resampler's table halved (its history kept newest first too), its 7.5 KiB the RAM code's: a voice's block, the matrix, the FILTER, the split and the drums' sides in RAM; core 1's parts from the RAM copy; the expression keys' pass not run for a kit; the lines model (tests/cpu_lines_test.py, tools/audio_map.txt); V10.8.59 (the owner: "una visual por canción, muy audio reactiva, todas deformadas y fusionadas"; SCL simplified and PER1/PER2 settings no longer read for the room): VISUAL from the song (GEN seed, genre, mood, energy; else the project), hits (kick jump and thump, snare glitch, note lobes), one field bends every layer; V10.8.58 (the owner: "veamos qué se puede hacer con menos espacio"): VISUAL composed in the same room: the data a few boxes apart with their callouts, a head with crown, temples, cheekbones, jaw and neck (no egg), WHEEL's worms in some scenes on the other third, the core and the ground placed and sized by the seed, the mesh or its rows alone (topographic), the skull's spokes with square tips, PALETTE every layer (MIXED: onLine truncated
#endif
#if FELUCCA_OTA && !FELUCCA_FLASH
#error "FELUCCA_OTA needs FELUCCA_FLASH"
+139 -50
View File
@@ -577,7 +577,7 @@ static uint32_t gdna(uint8_t *map)
* at COMPLEX 0, .. 3 past 80) */
return km;
}
static __attribute__((noinline)) void gjazz(track_t *t, uint32_t len)
BTAPP_FN static void gjazz(track_t *t, uint32_t len) /* (V10.8.69: the segment's, as gen_drums: its caller gen_post the same flow) */
{ /* (V10.8.41, the owner: "jazz's drums far more complex and subtle,
* ghost notes, off-beats") the snare's comping written: eight bars of
* it (its "and"s mostly), another every bar, every hit a ghost (the
@@ -1932,9 +1932,9 @@ static __attribute__((noinline)) void gen_kit(track_t *t)
}
t->p[P_E0] = (int16_t)grr(40, 88); /* MORPH */
t->p[P_E2] = (int16_t)clamp(70 + k->tone, 0, 127);
t->p[P_E3] = (int16_t)clamp(54 + k->decy, 0, 127); /* (V10.8.68, BYTE 77f2b602, the owner: "too long": 10 shorter) */
t->p[P_E3] = (int16_t)clamp(64 + k->decy, 0, 127); /* (V10.8.69: V10.8.67's punch back) */
t->p[P_E4] = (int16_t)clamp(64 + k->nois, 0, 127);
t->p[P_E7] = (int16_t)clamp(k->drv / 3 + (gs.g->spec & GSP_HEAVY ? grr(10, 20) : 0), 0, 127); /* (V10.8.68, BYTE's: "too much distortion": a third) */ /* (gen2: the kit's
t->p[P_E7] = (int16_t)clamp(k->drv * 2 / 3 + (gs.g->spec & GSP_HEAVY ? grr(24, 40) : 0), 0, 127); /* (gen2: the kit's
* DRIVE two thirds; V10.6p: a heavy genre's driven harder) */
t->p[P_FTYPE] = 0;
t->p[P_FCUT] = (int16_t)grr(gs.g->human >= 40u ? 122 : 114, 127); /* (V10.6w, the owner: the drums' brightness
@@ -1966,15 +1966,16 @@ static __attribute__((noinline)) void gen_kit(track_t *t)
* snare, the clap and the hats up, longer, driven (0: untouched) */
int32_t m = grd.mood, l, c = m / 2 + (m < -25 ? (m + 25) * 5 : 0), e = c < -50 ? -50 : c; /* (V10.8.41: to -25 a light
* hand, ~6 dB and a little shorter and darker; the kit gone only near -50) */
t->p[P_E3] = (int16_t)clamp(t->p[P_E3] + (m < 0 ? e : -m / 4), 0, 127); /* (V10.8.45, the owner: "DANCE's decays too long,
t->p[P_E3] = (int16_t)clamp(t->p[P_E3] + (m < 0 ? e : -m / 5), 0, 127); /* (V10.8.45, the owner: "DANCE's decays too long,
* they cover the other layers": a little shorter, was longer) */
if (m < 0) {
t->p[P_FCUT] = (int16_t)(t->p[P_FCUT] + e);
for (l = 0; l < 8; l++)
t->p[P_LN0 + l] = (int16_t)clamp(t->p[P_LN0 + l] + (l == DV_HATC ? m : c + (l ? 0 : m / 2)), 0, 127);
} else { /* (V10.8.68, BYTE 77f2b602: DANCE's kit no extra drive) */
} else {
t->p[P_LN0] = 127;
for (l = 1; l < 5; l++) t->p[P_LN0 + l] = (int16_t)clamp(t->p[P_LN0 + l] + m / 5, 0, 127);
t->p[P_E7] = (int16_t)clamp(t->p[P_E7] - m / 2, 0, 127);
t->p[P_E7] = (int16_t)clamp(t->p[P_E7] + m / 2, 0, 127);
}
}
if (gs.g->drum == DM_JAZZ) /* (V10.8.47, the owner: "jazz's hats at 50 % or less") whatever the mood */
@@ -2023,8 +2024,8 @@ BTAPP_FN static void gmix_more(track_t *t, uint32_t r) /* (the Bluetooth segme
* part of a genre's piece down by its genre's trim (LEVEL steps, 0.5 dB), the mix's balance as it was: measured before the
* master (tests/gen_peak.c, the stems' and the mix's peaks over the genres x MOOD -50 / 0 / +50) its loudest piece's mix
* under -1 dBFS (were up to +13 dBFS, the leveler at its floor and the limiter taking the rest: the distortion); the
* LEVELER (fx.c lev_block) brings the whole back to its loudness. The last EXPLORE's */
static const uint8_t GTRIM[] BTAPP_RO = {29, 29, 26, 20, 21, 31, 29, 14, 21, 20, 24, 19, 16, 12, 15, 19, 14, 26, 20, 19, 12, 18,
* LEVELER (fx.c lev_block) brings the whole back to its loudness. The last EXPLORE's (V10.8.69: HARD BASS and KRAUT 1 dB more, the kits' punch back: their DANCE pieces -0.1 and -0.6 dBFS) */
static const uint8_t GTRIM[] BTAPP_RO = {29, 29, 28, 20, 21, 31, 29, 14, 21, 20, 24, 19, 16, 12, 15, 19, 16, 26, 20, 19, 12, 18,
31, 24, 21, 16, 24, 17, 14, 21};
_Static_assert(sizeof GTRIM == NGENRE + 1u, "GTRIM: a genre each, EXPLORE last");
static __attribute__((noinline)) void gen_mix(track_t *t, uint32_t r)
@@ -2041,10 +2042,7 @@ static __attribute__((noinline)) void gen_mix(track_t *t, uint32_t r)
/* (p3, the owner: "the leads eat the drums and everything else; the drums always in front, the rest accompanies")
* the drums up, the bass under them, the chords and the arp back, the lead ~6 dB under gen3's; the genre's lift at
* half and on the bass and the chords only */
lv = (grd.mood > 0 && r == RL_DRUM ? -grd.mood / 3 : 0) + /* (V10.8.68, BYTE 77f2b602: DANCE's drums down; its
* melodic parts' lift left out: FM's GTRIM headroom already, a
* BREAKBEAT's arp and pad past gen_peak's -1 dBFS with it) */
((r == RL_DRUM ? 110 + (grd.mood < -25 ? grd.mood * 2 / 3 + 12 : grd.mood / 5) : r == RL_BASS ? 110 : r == RL_LEAD ? (g->lead == LD_RIFF ? 108 : 92) : r == RL_ARP ? 96 :
lv = ((r == RL_DRUM ? 110 + (grd.mood < -25 ? grd.mood * 2 / 3 + 12 : grd.mood / 5) : r == RL_BASS ? 114 : r == RL_LEAD ? (g->lead == LD_RIFF ? 108 : 92) : r == RL_ARP ? 96 :
r == RL_TEX ? (g->tex == SR_NOISE ? 56 : 66) : 100) +
(r == RL_BASS || r == RL_PAD ? GG_LIFT(GGR) / 2 : 0) + /* (the genre's own: GGRAM) */
(gs.gi < NGENRE ? (r == RL_TEX ? 8 : 3) * ((int8_t)(GMIX[gs.gi][r >> 1] << (r & 1u ? 0 : 4)) >> 4) : 0) +
@@ -2108,7 +2106,7 @@ static __attribute__((noinline)) void gen_mix(track_t *t, uint32_t r)
* colour: dark, as it was, or brighter, the three parts together) */
if (r == RL_DRUM && (g->spec & GSP_HEAVY)) /* (p4b, the owner: EBM's drums industrial, distorted, simple;
* V10.6p: phonk's and baile funk's too) */
t->p[P_DIST] = (int16_t)grr(16, 30); /* (V10.8.68, BYTE's: "too much distortion": half) */
t->p[P_DIST] = (int16_t)grr(40, 60);
gmix_more(t, r);
}
@@ -2330,6 +2328,115 @@ static __attribute__((noinline)) void gtile(track_t *t)
t->p[P_SLEN] = NSTEP;
}
static uint32_t gls_snare(const track_t *t);
/* (V10.8.69, JIANT BYTE's: its song plans and its sections' automation, locks and components) */
/* (V10.7.26, the owner: "SONG always gives the same structure") FORM SONG's own plans: templates by the genre's family,
* a seed's one of them, its rows thrown. A row's kind (GT_*), its lengths (SL: 4|8, 8|16, 16|32 bars, the build's 4),
* whether it plays (always; a seed's half; ENERGY's share: the second and third drops, the last chorus again; with the
* row before it: a break's build and drop, the bridge's last chorus). The longer length: a drop's ENERGY's share, an
* intro's, a break's, an outro's the rest (low ENERGY: longer ins and outs, high: longer drops). The kinds the club's
* sections play (A the piece, B its crash, C the build, D the break; the arc's: C the drums with the lead out): a
* verse a groove, the chorus (the hook) a drop, the pre-chorus a build, the bridge a break. 0xFF: a template's end */
#define GSI(t, l) (uint8_t)((t) | (l) << 4)
#define GSO 0x40u /* a seed's half */
#define GSE 0x80u /* ENERGY's share */
#define GSN 0xC0u /* with the row before it that may not play */
static const uint8_t SONG_T[] BTAPP_RO = {
/* the club: the classic (the drums, the layers, the groove, break build drop, a second one by ENERGY, out) */
GSI(GT_INTROK, 1), GSI(GT_INTRO, 0) | GSO, GSI(GT_GROOVE, 2), GSI(GT_BREAK, 0), GSI(GT_BUILD, 3), GSI(GT_DROP, 1),
GSI(GT_GROOVE2, 0) | GSO, GSI(GT_BREAK, 0) | GSE, GSI(GT_BUILD, 3) | GSN, GSI(GT_DROP, 1) | GSN, GSI(GT_OUTRO, 1),
GSI(GT_INTROK, 0) | GSO, 0xFF,
/* the DJ's: long in and out, one drop */
GSI(GT_INTROK, 2), GSI(GT_GROOVE, 2), GSI(GT_GROOVE2, 1) | GSO, GSI(GT_BREAK, 1), GSI(GT_BUILD, 3), GSI(GT_DROP, 2),
GSI(GT_GROOVE, 1) | GSO, GSI(GT_OUTRO, 2), 0xFF,
/* drop after drop: built from the intro, the break's, a third by ENERGY, the end the drop's or an outro */
GSI(GT_INTRO, 1), GSI(GT_BUILD, 3), GSI(GT_DROP, 1), GSI(GT_BREAK, 1), GSI(GT_BUILD, 3), GSI(GT_DROP, 2),
GSI(GT_GROOVE2, 0) | GSO, GSI(GT_BREAK, 0) | GSE, GSI(GT_BUILD, 3) | GSN, GSI(GT_DROP, 1) | GSN, GSI(GT_OUTRO, 0) | GSO, 0xFF,
/* the groove's (deep, minimal): grooves, the breakdown, the drop (a build or none) */
GSI(GT_INTROK, 1), GSI(GT_INTRO, 1), GSI(GT_GROOVE, 2), GSI(GT_GROOVE2, 1), GSI(GT_BREAK, 0), GSI(GT_BUILD, 3) | GSO,
GSI(GT_DROP, 1), GSI(GT_GROOVE, 1) | GSO, GSI(GT_OUTRO, 1), GSI(GT_INTROK, 0) | GSO, 0xFF,
/* the song: the pop song (verse, pre-chorus, chorus, verse 2, chorus, the bridge and the last chorus, again) */
GSI(GT_INTRO, 0), GSI(GT_GROOVE, 1), GSI(GT_BUILD, 3) | GSO, GSI(GT_DROP, 1), GSI(GT_GROOVE2, 1), GSI(GT_BUILD, 3) | GSN,
GSI(GT_DROP, 1), GSI(GT_BREAK, 0) | GSO, GSI(GT_DROP, 1) | GSN, GSI(GT_DROP, 0) | GSE, GSI(GT_OUTRO, 0) | GSO, 0xFF,
/* the band's: verse chorus verse chorus, the bridge, the chorus (twice by ENERGY) */
GSI(GT_INTROK, 0), GSI(GT_GROOVE, 1), GSI(GT_DROP, 1), GSI(GT_GROOVE2, 1), GSI(GT_DROP, 1), GSI(GT_BREAK, 1),
GSI(GT_BUILD, 3) | GSO, GSI(GT_DROP, 1), GSI(GT_DROP, 0) | GSE, GSI(GT_OUTRO, 0) | GSO, 0xFF,
/* the short one: two verses, the chorus, the bridge, the long chorus */
GSI(GT_INTRO, 1) | GSO, GSI(GT_GROOVE, 1), GSI(GT_GROOVE2, 1) | GSO, GSI(GT_DROP, 1), GSI(GT_BREAK, 0), GSI(GT_DROP, 2),
GSI(GT_OUTRO, 1), 0xFF,
/* the hip hop's: the hook first, verses of 16 or 32 */
GSI(GT_INTRO, 0), GSI(GT_DROP, 1), GSI(GT_GROOVE, 2), GSI(GT_DROP, 1), GSI(GT_GROOVE2, 2), GSI(GT_BREAK, 0) | GSO,
GSI(GT_DROP, 1), GSI(GT_OUTRO, 0) | GSO, 0xFF,
/* the verse first, a third verse and hook by ENERGY */
GSI(GT_INTROK, 0), GSI(GT_GROOVE, 2), GSI(GT_DROP, 1), GSI(GT_GROOVE2, 2), GSI(GT_DROP, 1), GSI(GT_GROOVE, 1) | GSE,
GSI(GT_DROP, 1) | GSN, GSI(GT_OUTRO, 0) | GSO, 0xFF,
/* the arc: the layers in, the climax, the break, the climax again by ENERGY, out */
GSI(GT_INTRO, 1), GSI(GT_GROOVE, 1), GSI(GT_GROOVE2, 2), GSI(GT_DROP, 2), GSI(GT_BREAK, 1), GSI(GT_DROP, 1) | GSE,
GSI(GT_OUTRO, 1), 0xFF,
/* one layer alone first, the drums' (C) */
GSI(GT_OUTRO, 1), GSI(GT_INTRO, 1), GSI(GT_GROOVE, 2), GSI(GT_BUILD, 1) | GSO, GSI(GT_DROP, 2), GSI(GT_BREAK, 1),
GSI(GT_GROOVE2, 1) | GSO, GSI(GT_OUTRO, 2), 0xFF,
/* two crests */
GSI(GT_INTRO, 1), GSI(GT_GROOVE, 1), GSI(GT_DROP, 1), GSI(GT_BREAK, 1), GSI(GT_GROOVE2, 1), GSI(GT_BUILD, 1) | GSO,
GSI(GT_DROP, 2) | GSE, GSI(GT_OUTRO, 1), 0xFF,
};
static const uint8_t SONG_FAM[5] BTAPP_RO = {0, 4, 7, 9, 12}; /* the club's, the song's, hip hop's, the arc's templates (FUGA's gone) */
/* (the song genres': hip hop's the urban drums', the dance ones' half the seeds the club's; 0xFF between) */
static const uint8_t SONG_DM[] BTAPP_RO = {DM_REGG, DM_REGG2, DM_DEMBOW, DM_DEMB2, DM_PHONK, DM_PHONK2, DM_TRAP, DM_DRILL, DM_BOOMBAP,
DM_BAILE, DM_BAILE2, 0xFF, DM_BREAKS, DM_EBM, DM_EBM2, DM_EBM3, DM_EBM4, DM_EBM5, DM_ELECTRO,
DM_TROCK};
/* the plan in pb (GPL's rows), its count; fok: the rows whose fill may take a row of their own (the rows CHAIN_ROWS: the
* fills into a break, a build, a drop first), bit 31 the intro without its kick */
static __attribute__((noinline)) uint32_t gsong(uint8_t *pb, uint32_t plan, uint32_t lb, uint32_t dk, uint32_t *fok)
{
const ggenre_t *g = gs.g;
const uint8_t *p = SONG_T;
uint32_t fam, n = 0, j, k, on = 1, e = gs.energy, cost = 0, bpm = (uint32_t)song.g[G_BPM];
uint8_t c[CHAIN_ROWS];
fam = g->form == FM_ARC ? 3u : g->form != FM_PARTS ? 0u : 1u;
for (j = 0, k = 2; fam == 1u && j < sizeof SONG_DM; j++)
if (SONG_DM[j] == 0xFFu) k = 0;
else if (SONG_DM[j] == g->drum) fam = k ? k : (uint32_t)!gch(50);
for (k = SONG_FAM[fam] + gr() % (uint32_t)(SONG_FAM[fam + 1u] - SONG_FAM[fam]); k; k -= *p++ == 0xFFu) {}
for (; p < SONG_T + sizeof SONG_T && *p != 0xFFu && n < CHAIN_ROWS; p++) {
uint32_t t = *p & 15u, o = *p >> 6, l = (*p >> 4) & 3u, b;
if (o == 1u || o == 2u) on = (uint32_t)gch(o == 1u ? 50u : e);
if (o && !on) continue;
b = l == 3u ? 4u : (4u << l) << gch(t == GT_DROP ? e : t <= GT_INTRO || t == GT_OUTRO || t == GT_BREAK ? 100u - e : 50u);
pb[n++] = (uint8_t)(t | b << 2);
}
if (g->drum == DM_EBM5) pb[0] = (uint8_t)((pb[0] & 0xF0u) | GT_INTROK); /* (EBM's reference: its intro kickless) */
for (k = 0; k < 12u; k++) { /* two to five minutes: the longest halved, the shortest doubled */
uint32_t tot = 0, best = n, u, lo = bpm / 2u, hi = bpm * (uint32_t)(125 + (grd.mood < 0 ? grd.mood / 2 : 0)) / 100u; /* (CALM: to
* four minutes at most, before gen_parts' cut) */
for (j = 0; j < n; j++) tot += (pb[j] >> 4) * 4u;
if (tot >= lo && tot <= hi) break;
for (j = 0; j < n; j++) {
u = pb[j] >> 4;
if ((plan && (pb[j] & 15u) == GT_BUILD) || (tot > hi ? u < 2u : u > 4u)) continue;
if (best == n || (tot > hi ? u > (uint32_t)(pb[best] >> 4) : u < (uint32_t)(pb[best] >> 4))) best = j;
}
if (best == n) break;
u = pb[best] >> 4;
pb[best] = (uint8_t)((pb[best] & 15u) | (tot > hi ? u / 2u : u * 2u) << 4);
}
for (j = 0; j < n; j++) { /* the rows: one a kind, the drop's crash, the fills */
uint32_t t = pb[j] & 15u, b = (pb[j] >> 4) * 4u, cr = plan && dk && t == GT_DROP && b > lb;
cost += 1u + cr;
c[j] = (uint8_t)(dk && (pb[(j + 1u) % n] & 15u) != t && t != GT_INTROK && t != GT_BREAK &&
(t != GT_BUILD || !plan) && b - (cr ? lb : 0u) > lb);
}
*fok = fam == 0u && (pb[0] & 15u) == GT_INTROK && gch(25) ? 1u << 31 : 0u; /* (an intro of the hats and the snare) */
for (j = 0; j < n; j++) if (!c[j]) *fok |= 1u << j;
for (k = 0; k < 2u; k++)
for (j = 0; j < n; j++) {
uint32_t nt = pb[(j + 1u) % n] & 15u;
if (c[j] && !((*fok >> j) & 1u) && cost < CHAIN_ROWS && (k || nt == GT_BREAK || nt == GT_BUILD || nt == GT_DROP)) {
*fok |= 1u << j;
cost++;
}
}
return n;
}
BTAPP_FN static void gx_prog(uint32_t fam);
static void gen_parts(void)
{
@@ -2341,7 +2448,9 @@ static void gen_parts(void)
uint32_t base = gls.on ? 3u : 1u | (form == FM_ARC ? 4u : 0u), dense = gls.on ? 0u : form == FM_PARTS ? 4u : form == FM_ARC ? 8u : 0u; /* (the
* sections whose drums are A's; the denser ones) */
uint8_t pdeg[4], pq[4], pn = gs.pn, secm[4] = {0};
uint32_t en;
uint32_t en, fok = ~0u >> 1, sg = (gp.form == 1u || gp.form == 2u) && !gls.on; /* (V10.8.69, BYTE V10.7.26: SONG's
* own plans, gsong; PARTS' too, its rows at half length) */
uint8_t pb[CHAIN_ROWS];
const uint8_t *pl;
if (form == FM_LOOP) { section_store(0); dice_secs |= 1u; return; }
gseed(GS_FORM);
@@ -2494,6 +2603,14 @@ static void gen_parts(void)
gmute(dr);
if (bs < NTRK && (ld < NTRK || ar < NTRK || pd < NTRK)) trk[bs].p[P_MUTE] = 1;
}
for (i = 0; i < NTRK; i++) /* (BYTE: every melodic part's timbre moving over its loop, the
* break's back) */
if (gs.role[i] - 1u < 5u && gs.act[gs.role[i]] && trk[i].eng_req != ENGI_DRUM) {
track_t *q = &trk[i];
int32_t dp = 4 + (int32_t)gs.complex / 8;
gmot(q, 0, P_E6, q->p[P_E6], 0);
gmot(q, dlen(q) > 1u ? dlen(q) - 1u : 0u, P_E6, q->p[P_E6] + (k == 3u ? -dp / 2 : dp), 1);
}
for (i = 0; i < NTRK; i++) secm[k] |= (uint8_t)((trk[i].p[P_MUTE] != 0) << i);
section_store(k);
if (live.cur == (int8_t)k) dice_secs |= (uint8_t)(1u << k);
@@ -2513,8 +2630,9 @@ static void gen_parts(void)
pl = &PLAN_ROWS[PLAN_OF[np]];
np = PLAN_OF[np + 1u] - PLAN_OF[np];
gseed(GS_FORM);
if (sg) { np = gsong(pb, plan, lb, dr < NTRK && gs.act[RL_DRUM], &fok); pl = pb; }
for (j = 0; j < np; j++) {
uint32_t t = pl[j] & 15u, nt = pl[(j + 1u) % np] & 15u, bars = (pl[j] >> 4) * 4u >> (half + !gls.on), s, m = 0, gm = 0, fill, f; /* (V10.8.45, the owner: "a section lasts more than
uint32_t t = pl[j] & 15u, nt = pl[(j + 1u) % np] & 15u, bars = (pl[j] >> 4) * 4u >> (half + (!gls.on && !sg)), s, m = 0, gm = 0, fill, f; /* (V10.8.45, the owner: "a section lasts more than
* twice what it should": half; MY LOOP's as they were) */
if (bars < 4u) bars = 4u;
if (t >= GT_SEC) { s = t - GT_SEC; m = secm[s]; }
@@ -2528,20 +2646,20 @@ static void gen_parts(void)
if (gs.trk_of[r] < NTRK && (gs.act[r] || r == RL_TEX)) { allow |= 1u << r; cap--; }
}
for (k = 0; k < NTRK; k++) if (!((allow >> gs.role[k]) & 1u)) m |= 1u << k;
gm = f >> 4 | (t == GT_INTROK && g->drum == DM_EBM5 ? DXG_KICK : 0u); /* (the owner's EBM reference: its
gm = f >> 4 | (t == GT_INTROK && (g->drum == DM_EBM5 || (!j && fok >> 31)) ? DXG_KICK : 0u); /* (the owner's EBM reference: its
* intro without the kick) */
s = t == GT_BREAK ? 3u : t == GT_BUILD ? 2u : gls.on && t != GT_DROP ? (i >> t) & 1u : 0u;
if (gls.on && t != GT_DROP && gch(30)) bars = bars > 8u ? bars / 2u : bars * 2u; /* (MY LOOP: a seed's lengths) */
if (t == GT_DROP && gch(50)) bars *= 2u; /* (a drop of 16 or 32) */
if (t == GT_DROP && !sg && gch(50)) bars *= 2u; /* (a drop of 16 or 32) */
if (gls.on && t == GT_DROP) m &= gls.add; /* (FROM LOOP: the drop the loop as it is, its own parts all in) */
}
while (!gls.on && bars > 4u && bars * 10u > (uint32_t)song.g[G_BPM]) bars /= 2u;
while (!gls.on && !sg && bars > 4u && bars * 10u > (uint32_t)song.g[G_BPM]) bars /= 2u;
if (grd.mood < 0 && !(t == GT_BUILD && grd.mood > -25)) { /* (V10.8.68, BYTE 09ec6b57) MOOD CALM: a row down to ~41 % at -50 */
bars = ((bars * (uint32_t)(128 + grd.mood + grd.mood / 2) >> 7) + 1u) & ~1u;
if (bars < 4u) bars = 4u;
} /* (.. and none over ~24 s: a slow tempo's shorter) */
m |= gls.mute;
fill = dr < NTRK && gs.act[RL_DRUM] && nt != t && !gm && !((m >> dr) & 1u) && (((base | dense) >> s) & 1u);
fill = ((fok >> j) & 1u) && dr < NTRK && gs.act[RL_DRUM] && nt != t && !gm && !((m >> dr) & 1u) && (((base | dense) >> s) & 1u);
if (t == GT_DROP && plan && !gls.on && dr < NTRK && gs.act[RL_DRUM] && bars > lb) { rows = grow(rows, 1, lb, m, gm, 0, 0); bars -= lb; } /* (the
* crash's: the club's B) */
f = fill ? (bars > lb ? bars - lb : 0u) : bars;
@@ -2858,24 +2976,6 @@ static void gen_post(void)
if (i + 1u < len && trk[bs].step[i + 1u].time == ST_NOTE && gch(GG_SLD(gg) * 12u)) s->flags |= SF_SLIDE;
if (i % 4u == 2u && s->n == 1u && s->note[0] <= 52u && gin_mode(s->note[0]) && gch(GG_OCT(gg) * 12u)) s->note[0] += 12;
}
{ /* (V10.8.34, the owner: "call and response") a dialogue, a throw in two: where the lead speaks (two notes or
* more in a half bar) the arp is silent, and answers in its gaps; not where the lead leaves it none */
uint32_t ld = gs.trk_of[RL_LEAD], ar = gs.trk_of[RL_ARP], c = 0, kill = 0, busy = 0, j;
if (ld < NTRK && ar < NTRK && gs.act[RL_LEAD] && gs.act[RL_ARP] && gch(50)) { /* (V10.8.36: EXPLORE's too) */
uint32_t ll = dlen(&trk[ld]);
len = dlen(&trk[ar]);
for (k = 0; k < 2u; k++) /* (the first pass counts the lead's busy half bars) */
for (i = 0; i < len && busy * 4u <= len / 8u * 3u; i++) {
step_t *s = &trk[ar].step[i];
if (!(i & 7u)) {
for (j = c = 0; j < 8u; j++) c += trk[ld].step[(i + j) % ll].time == ST_NOTE;
if (!k) busy += c >= 2u;
}
if (!k) continue;
if (c >= 2u || (kill && s->time == ST_TIE)) { gclear(s); kill = 1; } else kill = 0;
}
}
}
gchr();
gq = q0;
}
@@ -2936,19 +3036,8 @@ static void gen_post(void)
}
}
}
if (gx.on) {
gx_comps(); /* (0.8.6) EXPLORE: wilder ones (V10.6n: the odd track's; every
if (gx.on) gx_comps(); /* (0.8.6) EXPLORE: wilder ones (V10.6n: the odd track's; every
* piece's) */
if (gch(45)) { /* (V10.8.41, the owner: "cuts, changes") the cut: the cycle's last
* beat or two silent but for the drums and the odd role's track */
uint32_t n = gch(50) ? 4u : 8u;
for (k = 0; k < NTRK; k++) {
uint32_t len = dlen(&trk[k]);
if (gs.role[k] == RL_DRUM || gs.role[k] == gx.orole || len < 16u) continue;
for (i = len - n; i < len; i++) gclear(&trk[k].step[i]);
}
}
}
for (k = 0; k < NTRK; k++) /* (seq2d) the CP_* written above as components v2 */
comp_migrate(trk[k].step, dlen(&trk[k]));
}
@@ -3446,7 +3535,7 @@ static __attribute__((noinline)) void gen_make(void)
if (grd.mood > 0 && gs.act[RL_DRUM]) song.g[G_DUCK] = (int16_t)clamp(song.g[G_DUCK] + grd.mood / 3, 40, 60); /* (V10.8.41) DANCE: the kick's pump deeper (V10.8.68, BYTE's: 40 .. 60) */
if (g->snd[GP_BASS] == SR_WOW && gs.act[RL_BASS] && gs.trk_of[RL_BASS] < NTRK) gwobble(&trk[gs.trk_of[RL_BASS]]);
song.g[G_DREL] = (int16_t)(g->drum == DM_TECHNO || g->drum == DM_HARD || g->drum == DM_HBASS ? grr(15, 30) : grr(25, 45));
song.g[G_CLIP] = (int16_t)(gs.act[RL_DRUM] ? (g->spec & GSP_HEAVY ? grr(40, 60) : grr(25, 45)) : grr(10, 30)); /* (V10.8.68, BYTE's: lower) */ /* (gen3: a
song.g[G_CLIP] = (int16_t)(gs.act[RL_DRUM] ? (g->spec & GSP_HEAVY ? grr(60, 85) : grr(35, 65)) : grr(10, 30)); /* (V10.8.69: BYTE's, the drums' punch) */ /* (gen3: a
* little more: the peaks rounded; V10.6p: a heavy genre's driven) */
song.g[G_PUNCH] = (int16_t)(gs.act[RL_DRUM] ? grr(45, 85) : 0);
if (gx.on) { /* (0.8.6) EXPLORE: the grain delay's pitch and spray, a ping-pong,
+3 -3
View File
@@ -974,11 +974,11 @@ static const uint8_t GC_LEN[3][3] = {{0, 48, 40}, {0, 24, 20}, {40, 28, 22}};
static const uint8_t GMIX[][3] = {
GMX(2, 7, -2, 0, 6, 0), /* MINIMAL TECHNO (V10.8.68: kept, not BYTE's 15 dB down: the owner's minimal its sub over the drums) (V10.8.41: the drums 3 dB up, the line that turns over them heard) */
GMX(-3, 0, 0, 0, 7, 6), /* HARD TECHNO (V10.7.2: the bass +1.5 dB, V10.6z10's basses ~1.8 under) */
GMX(-3, 3, 3, 7, 4, 6), /* HARD BASS (V10.8.68: its bass 6 dB down) (V10.8.36: the arp +6 dB, 22 under the drums) */
GMX(-3, 7, 3, 7, 4, 6), /* HARD BASS (V10.8.69: its bass back, the kit's punch back) (V10.8.36: the arp +6 dB, 22 under the drums) */
GMX(-1, 2, 1, 0, 7, 0), /* HOUSE */
GMX(-2, 4, 2, 0, 7, 0), /* DEEP HOUSE (V10.7.2: the bass +1.5, z10's ~1.2 under) */
GMX(-3, 1, -1, 0, 7, 0), /* TECH HOUSE (V10.7.2: the bass +1.5, z10's ~1.6 under) */
GMX(-3, 0, 1, 0, 7, 5), /* TRIBAL (V10.8.68: the bass down, over the lighter kit by 7.6 dB; its level was at the top) */
GMX(-3, 4, 1, 0, 7, 5), /* TRIBAL */
GMX(0, -3, 0, 6, 3, -2), /* CUMBIA (the bass under the drums) (V10.8.41: the keyboard up front) (V10.8.36: the arp +4.5 dB, 21 under) */
GMX(-1, 2, -5, 7, 6, 4), /* REGGAETON (V10.8.41: the 808, the arp and the hook up) (V10.8.36: the hook +6 dB, 19 under the drums) (V10.7.8, the owner's reference: the drums up front, the 808 up, the pad, the hook
* and the arp under them, the pad under the arp) */
@@ -990,7 +990,7 @@ static const uint8_t GMIX[][3] = {
GMX(-3, 0, 0, 3, 3, 4), /* IDM AMBIENT */
GMX(4, -3, 0, 2, 5, 3), /* IDM WEIRD (V10.8.41: the drums 6 dB up) */
GMX(-3, -1, 5, 7, 7, 5), /* KRAUT */
GMX(-3, -3, 0, 7, 7, 0), /* EBM (V10.8.68: its sub 15 dB down, the lighter kit; its level at the top) (the owner's dark techno / industrial reference: its sub's rumble up; the
GMX(-3, 7, 0, 7, 7, 0), /* EBM (the owner's dark techno / industrial reference: its sub's rumble up; the
* other throws' FAT BASS as it was, at the level's top already) */
GMX(0, 0, 4, 3, 2, 3), /* NEO CLASSIC */
GMX(0, -5, -2, 4, -2, 1), /* ELECTRO METAL (V10.8.36: the arp +4.5 dB, 21 under; V10.8.48: the bass down, its peak at the limit: its level was at the top) */
+7
View File
@@ -45,6 +45,13 @@ static unsigned str_len(const char *s)
n++;
return n;
}
/* (V10.8.69) the n-th of a packed list of names ("A\0B\0C"): a table of pointers' 4 B a name saved */
static __attribute__((noinline)) const char *str_nth(const char *p, unsigned n)
{
while (n--)
while (*p++) {}
return p;
}
static void str_cpy(char *d, const char *s, unsigned max)
{
+6 -6
View File
@@ -15,12 +15,12 @@ enum { MI_COLOR, MI_SCOPE, MI_LARGE, MI_ANIM, MI_LEDS, MI_SCROFF, MI_SAVER, MI_H
* CLOCK in SYSTEM; codex/coherence: INIT SYSTEM gone,
* SAVE > TOOLS > CLEAR PROJECT the one place) */
#define MI_VALUES MI_PANEL
static const char *const MI_NAME[MI_COUNT] = {"COLOR", "SCOPE", "LARGE", "ANIM", "LEDS", "SCREEN OFF", "SAVER", "HELP", "PRESETS", "PANEL", "HOLD", "KNOB ACCEL", "FX LATCH", "BPM LOCK",
"SCALE LEDS", "MIDI OUT", "MIDI MAP", "LEARN",
"VELOCITY", "VEL MIN", "AFTERTOUCH", "VEL LEARN",
"SPEAKER EQ", "USB LEVEL", "CLICK", "CLICK LEVEL", "COUNT-IN", "TRACKS", "LOAD",
"OCT BEND", "USB",
"RESTORE LAST", "CPU CORES", "CPU CLOCK", "BLUETOOTH", "CALIBRATION", "ABOUT"};
static const char MI_NAME[] = /* (V10.8.69: packed, str_nth; was a table of pointers) */
"COLOR\0" "SCOPE\0" "LARGE\0" "ANIM\0" "LEDS\0" "SCREEN OFF\0" "SAVER\0" "HELP\0" "PRESETS\0" "PANEL\0"
"HOLD\0" "KNOB ACCEL\0" "FX LATCH\0" "BPM LOCK\0" "SCALE LEDS\0" "MIDI OUT\0" "MIDI MAP\0" "LEARN\0"
"VELOCITY\0" "VEL MIN\0" "AFTERTOUCH\0" "VEL LEARN\0" "SPEAKER EQ\0" "USB LEVEL\0" "CLICK\0"
"CLICK LEVEL\0" "COUNT-IN\0" "TRACKS\0" "LOAD\0" "OCT BEND\0" "USB\0" "RESTORE LAST\0" "CPU CORES\0"
"CPU CLOCK\0" "BLUETOOTH\0" "CALIBRATION\0" "ABOUT";
/* 1.0.5: the MENU's tabs (ui_menu.c: ALGORITHM steps between them, PRESETS among one tab's rows; the editor gets a
* row's tab after its MENU_DESC reply). A tab's rows follow each other in MI order (tests/ui_test.c checks it); at
* most MTAB_ROWS each (the page does not scroll: ui_menu.c fits them). A new row joins a tab here, a new tab is
+4 -4
View File
@@ -10,10 +10,10 @@
enum { B_FX, B_SCL, B_ENV, B_LFO, B_EDIT, B_GLO, B_HOME, B_SAVE, B_ARP, B_SEQ, B_PLAY, B_REC,
B_OCTDN, B_OCTUP, NB };
enum { EN_SELECT, EN_ALGO, EN_PRESET, EN_K1, EN_K2, EN_K3, EN_K4, NE };
static const char *const B_NAME[NB] = {"FX", "SCL", "ENV", "LFO", "EDIT", "GLO", "HOME", "SAVE",
"ARP", "SEQ", "PLAY", "REC", "OCT-", "OCT+"};
static const char *const E_NAME[NE] = {"SELECT", "ALGORITHM", "PRESETS", "KNOB 1", "KNOB 2",
"KNOB 3", "KNOB 4"};
static const char B_NAME[] = /* (V10.8.69: packed, str_nth) */
"FX\0" "SCL\0" "ENV\0" "LFO\0" "EDIT\0" "GLO\0" "HOME\0" "SAVE\0" "ARP\0" "SEQ\0" "PLAY\0" "REC\0" "OCT-\0" "OCT+";
static const char E_NAME[] = /* (V10.8.69: packed, str_nth) */
"SELECT\0" "ALGORITHM\0" "PRESETS\0" "KNOB 1\0" "KNOB 2\0" "KNOB 3\0" "KNOB 4";
#define PANEL_MAGIC 0x50414E35u /* "PAN5": bump when PANEL_DEFAULT changes */
typedef struct {
+33 -22
View File
@@ -562,18 +562,29 @@ static uint32_t sy_word(uint32_t lang, const char *w, uint32_t n, uint8_t *out,
/* --------------------------------------------------------------------------------------- the generator --- */
/* a phrase: templates of categories (N V A D P C: the banks' rows), filled from the theme with words that fit the
* syllables left; a phrase as long as the pattern's notes; the last word fits exactly (or a vocable) */
static const char *const TPL_ES[] = {"DNA", "VDN", "DNV", "PDN", "CDNV", "DNPDN", "VPDN", "NV", "PDNA"};
static const char *const TPL_EN[] = {"CVDN", "DAN", "PDAN", "DNPDN", "CV", "VDN", "PDN", "DNPAN"};
static const char *const TPL_JA[] = {"NPV", "ANPV", "NPN", "NPNPV", "AN", "NPAN"};
static const char *const SCAT_ES[] = {"la", "le", "li", "lo", "lu", "na", "ne", "no", "ma", "me", "mo", "pa", "pe", "po",
"ta", "te", "to", "ba", "bo", "da", "do", "ra", "ri", "sa", "so", "ya", "yo", "cha",
"fa", "ga", "go", "lan", "son", "tin", "bal", "mar", "sol", "dum", "pam"};
static const char *const SCAT_EN[] = {"doo", "bee", "dah", "bop", "wah", "dum", "dat", "dot", "day", "shoo", "la", "na",
"yeah", "oh"};
static const char *const SCAT_JA[] = {"ra", "ri", "ru", "re", "ro", "na", "ni", "nu", "ne", "no", "ta", "te", "to", "ka",
"ki", "ku", "ke", "ko", "sa", "shi", "su", "se", "so", "ma", "mi", "mu", "me", "mo",
"ha", "hi", "fu", "he", "ho", "ya", "yu", "yo", "wa", "pa", "pi", "pu", "pe", "po",
"n"};
#define NTPL_ES 9u
static const char TPL_ES[] = /* (V10.8.69: packed, str_nth) */
"DNA\0" "VDN\0" "DNV\0" "PDN\0" "CDNV\0" "DNPDN\0" "VPDN\0" "NV\0" "PDNA";
#define NTPL_EN 8u
static const char TPL_EN[] = /* (V10.8.69: packed, str_nth) */
"CVDN\0" "DAN\0" "PDAN\0" "DNPDN\0" "CV\0" "VDN\0" "PDN\0" "DNPAN";
#define NTPL_JA 6u
static const char TPL_JA[] = /* (V10.8.69: packed, str_nth) */
"NPV\0" "ANPV\0" "NPN\0" "NPNPV\0" "AN\0" "NPAN";
#define NSCAT_ES 39u
static const char SCAT_ES[] = /* (V10.8.69: packed, str_nth) */
"la\0" "le\0" "li\0" "lo\0" "lu\0" "na\0" "ne\0" "no\0" "ma\0" "me\0" "mo\0" "pa\0" "pe\0" "po\0" "ta\0"
"te\0" "to\0" "ba\0" "bo\0" "da\0" "do\0" "ra\0" "ri\0" "sa\0" "so\0" "ya\0" "yo\0" "cha\0" "fa\0" "ga\0"
"go\0" "lan\0" "son\0" "tin\0" "bal\0" "mar\0" "sol\0" "dum\0" "pam";
#define NSCAT_EN 14u
static const char SCAT_EN[] = /* (V10.8.69: packed, str_nth) */
"doo\0" "bee\0" "dah\0" "bop\0" "wah\0" "dum\0" "dat\0" "dot\0" "day\0" "shoo\0" "la\0" "na\0" "yeah\0"
"oh";
#define NSCAT_JA 43u
static const char SCAT_JA[] = /* (V10.8.69: packed, str_nth) */
"ra\0" "ri\0" "ru\0" "re\0" "ro\0" "na\0" "ni\0" "nu\0" "ne\0" "no\0" "ta\0" "te\0" "to\0" "ka\0" "ki\0"
"ku\0" "ke\0" "ko\0" "sa\0" "shi\0" "su\0" "se\0" "so\0" "ma\0" "mi\0" "mu\0" "me\0" "mo\0" "ha\0" "hi\0"
"fu\0" "he\0" "ho\0" "ya\0" "yu\0" "yo\0" "wa\0" "pa\0" "pi\0" "pu\0" "pe\0" "po\0" "n";
static uint32_t sy_rnd(uint32_t *r)
{
uint32_t x = *r ? *r : 0x9E3779B9u;
@@ -714,7 +725,7 @@ static uint32_t sy_norm_lang(uint32_t lang, const char *s, uint32_t n, char *d,
* pool, so sing[] and the RAM region keep their layout, and the audio code its code). */
#define LYB_NONE 0xFFFFu
#define LYB_SCAT LY_EN_NW /* SCAT_EN's from here, then the vocable */
#define LYB_N (LY_EN_NW + NELEM(SCAT_EN) + 1u)
#define LYB_N (LY_EN_NW + NSCAT_EN + 1u)
#define LYB_PH 1856u /* (2 + n a word: tests/voice_test.c checks they all fit) */
#define LYC_N 192u
static const char *const VOCABLE[3] = {"la", "oh", "ra"}; /* ES EN JA: what is sung when no word fits */
@@ -764,7 +775,7 @@ static void sing_init(void)
lyb_ok = 0;
for (k = 0; k < LYB_N; k++) {
char word[20];
const char *q = k < LYB_SCAT ? ly_word(&LY_BANK[1], k, word) : k < LYB_N - 1u ? SCAT_EN[k - LYB_SCAT] : VOCABLE[1];
const char *q = k < LYB_SCAT ? ly_word(&LY_BANK[1], k, word) : k < LYB_N - 1u ? str_nth(SCAT_EN, k - LYB_SCAT) : VOCABLE[1];
uint32_t m = sy_entry(q, 64u, &lyb_ph[o], LYB_PH - o);
lyb_at[k] = (uint16_t)(m ? o + 1u : 0u);
o += m;
@@ -839,7 +850,7 @@ static uint32_t sy_gen_word(const track_t *t, sing_t *s, uint32_t lang, uint32_t
uint32_t pick=theme*2u+(sy_rnd(&s->rng)&1u);
if(theme==TH_ANY) pick=sy_rnd(&s->rng)&15u;
if(!ly_en_ok) q="la";
else if(lyr>LYR_NW) q=SCAT_ES[sy_rnd(&s->rng)%NELEM(SCAT_ES)];
else if(lyr>LYR_NW) q=str_nth(SCAT_ES, sy_rnd(&s->rng)%NSCAT_ES);
else while(pick--) while(*q++);
str_cpy(s->w,q,sizeof s->w);
s->prem--;
@@ -856,13 +867,13 @@ static uint32_t sy_gen_word(const track_t *t, sing_t *s, uint32_t lang, uint32_t
s->tps = 0;
}
if (lyr > LYR_NW) { /* scat: 1 .. 3 syllables (English: one) */
const char *const *L = lang == LG_ES ? SCAT_ES : lang == LG_EN ? SCAT_EN : SCAT_JA;
uint32_t nl = lang == LG_ES ? NELEM(SCAT_ES) : lang == LG_EN ? NELEM(SCAT_EN) : NELEM(SCAT_JA);
const char *L = lang == LG_ES ? SCAT_ES : lang == LG_EN ? SCAT_EN : SCAT_JA;
uint32_t nl = lang == LG_ES ? NSCAT_ES : lang == LG_EN ? NSCAT_EN : NSCAT_JA;
uint32_t ns = lang == LG_EN ? 1u : 1u + sy_rnd(&s->rng) % 3u, k, m = 0;
if (ns > s->prem) ns = s->prem;
for (k = 0; k < ns; k++) {
uint32_t r = sy_rnd(&s->rng) % nl;
const char *q = L[r];
const char *q = str_nth(L, r);
if (!k && q[0] == 'n' && !q[1]) q = "na"; /* (no word starts with the moraic n) */
if (lang == LG_EN && ns == 1u)
src = LYB_SCAT + r;
@@ -874,14 +885,14 @@ static uint32_t sy_gen_word(const track_t *t, sing_t *s, uint32_t lang, uint32_t
return src;
}
for (tries = 0; tries < 10u && j < 0; tries++) {
const char *const *T = lang == LG_ES ? TPL_ES : lang == LG_EN ? TPL_EN : TPL_JA;
uint32_t nt = lang == LG_ES ? NELEM(TPL_ES) : lang == LG_EN ? NELEM(TPL_EN) : NELEM(TPL_JA), cat, th;
const char *T = lang == LG_ES ? TPL_ES : lang == LG_EN ? TPL_EN : TPL_JA;
uint32_t nt = lang == LG_ES ? NTPL_ES : lang == LG_EN ? NTPL_EN : NTPL_JA, cat, th;
const char *q;
if (s->tpl == 0xFFu || !T[s->tpl % nt][s->tps]) {
if (s->tpl == 0xFFu || !str_nth(T, s->tpl % nt)[s->tps]) {
s->tpl = (uint8_t)(sy_rnd(&s->rng) % nt);
s->tps = 0;
}
q = T[s->tpl % nt];
q = str_nth(T, s->tpl % nt);
switch (q[s->tps++]) {
case 'N': cat = 0; break;
case 'V': cat = 1; break;
+3 -2
View File
@@ -53,8 +53,9 @@ typedef struct { /* the song index (flash: OBJ_SONG
/* (add15-beta4) a row's variation of a track (ARRANGE 2's VAR): what its steps become when the row goes in (song_main.c
* row_vary), MUTE the track silent for the row */
enum { RV_NONE, RV_MUTE, RV_THIN, RV_FILL, RV_HALF, RV_REV, RV_SHIFT, RV_OCTU, RV_OCTD, RV_MUT1, RV_N = RV_MUT1 + 4 };
static const char *const RV_NAME[RV_N] = {"--", "MUTE", "THIN", "FILL", "HALF", "REV", "SHIFT", "OCT+", "OCT-",
"VAR 1", "VAR 2", "VAR 3", "VAR 4"};
static const char RV_NAME[] = /* (V10.8.69: packed, str_nth) */
"--\0" "MUTE\0" "THIN\0" "FILL\0" "HALF\0" "REV\0" "SHIFT\0" "OCT+\0" "OCT-\0" "VAR 1\0" "VAR 2\0"
"VAR 3\0" "VAR 4";
static void song_idx_touch(void); /* song_main.c: the index changed, into flash soon */
/* the state now as a scene (main loop: KNOB 4 on SONG; ISR: SONG REC) */
static void scene_capture(scene_t *s)
+7 -5
View File
@@ -956,10 +956,12 @@ static void rate_name(const track_t *t, uint32_t n, char *b)
/* (0.9.9-seq2d) SEQ > COMP / COMP 2: the step's C1 / C2 as ACTION LENGTH CONDITION VALUE (core.h CA_* CC_*) */
/* (gen3) the names short, each read whole on its card: the value's M where it fits with its unit (COMP's 49 px), else S
* (ui_test test_comp_cards: every value of every knob, every page) */
static const char *const CA_NAMES[CA_N + 1u] = {"OFF", "ARP", "SEQ", "OCT+", "OCT-", "RATCHET", "STUTTER", "MUTE", "TRANS",
"RANDOM", "FILL", "RAMP", "SOUND", "BEND", "SHIFT", "CHORD", "TRIG"};
static const char *const CC_NAMES[CC_NM] = {"ALWAYS", "25%", "50%", "75%", "1ST", "!1ST", "FILL", "!FILL", "PRE",
"!PRE", "NEI", "!NEI", "ELSE"};
static const char CA_NAMES[] = /* (V10.8.69: packed, str_nth; was a table of pointers) */
"OFF\0" "ARP\0" "SEQ\0" "OCT+\0" "OCT-\0" "RATCHET\0" "STUTTER\0" "MUTE\0" "TRANS\0" "RANDOM\0" "FILL\0"
"RAMP\0" "SOUND\0" "BEND\0" "SHIFT\0" "CHORD\0" "TRIG";
static const char CC_NAMES[] = /* (V10.8.69: packed, str_nth; was a table of pointers) */
"ALWAYS\0" "25%\0" "50%\0" "75%\0" "1ST\0" "!1ST\0" "FILL\0" "!FILL\0" "PRE\0" "!PRE\0" "NEI\0" "!NEI\0"
"ELSE";
#define CCL_NM 135u /* N:M, M 2..16, N 1..M */
#define CCL_N (CC_NM + 2u * CCL_NM) /* KNOB 3's list: the thirteen, the N:Ms, the !N:Ms */
/* the COMP pages one after another: COMP (the step's C1), COMP 2 (its C2): which this is (0..1) */
@@ -998,7 +1000,7 @@ static void cond_at(uint32_t i, uint32_t *c, uint32_t *nm)
static void cond_name(uint32_t c, uint32_t nm, char *b)
{
uint32_t k = 0;
if (c < CC_NM) { str_cpy(b, CC_NAMES[c], 8); return; }
if (c < CC_NM) { str_cpy(b, str_nth(CC_NAMES, c), 8); return; }
if (c == CC_NNM) b[k++] = '!';
fmt_int(b + k, (int32_t)CNM_N(nm));
k = str_len(b); b[k++] = ':';
+14 -13
View File
@@ -935,8 +935,8 @@ static void draw_tabs(void)
/* (0.9.2, rule 6) the footer's breadcrumb, as the mock-up's: small, DIM, from x 6, its parts apart by " . ": SECTION .
* GROUP . page ("FX . DELAY . DLY 2"; the menu "MENU . DISPLAY . COLOR", a layer "FX . MAP"), the group THEME, the page
* TEXT (`last`: a flash TEXT; the DRUM grid with ACC held: ACCENT, "ACCENT"); its place n/N in the chain at the right */
static const char *const FAM_CRUMB[FAM_COUNT] = {"HOME", "ENV", "LFO", "FX", "SCL", "EDIT", "GLO", "SAVE", "ARP", "SEQ",
"GLO"};
static const char FAM_CRUMB[] = /* (V10.8.69: packed, str_nth) */
"HOME\0" "ENV\0" "LFO\0" "FX\0" "SCL\0" "EDIT\0" "GLO\0" "SAVE\0" "ARP\0" "SEQ\0" "GLO";
static __attribute__((noinline)) void foot_crumbs(char *b, uint32_t n) /* b holds n (48) */
{
char ti[24];
@@ -947,7 +947,7 @@ static __attribute__((noinline)) void foot_crumbs(char *b, uint32_t n) /* b ho
}
if (!lz_on()) {
page_title(ti);
str_cpy(b, FAM_CRUMB[cur_page()->fam % FAM_COUNT], n);
str_cpy(b, str_nth(FAM_CRUMB, cur_page()->fam % FAM_COUNT), n);
str_cpy(b + str_len(b), " \xB7 ", 4);
str_cpy(b + str_len(b), ti, 20);
return;
@@ -957,7 +957,7 @@ static __attribute__((noinline)) void foot_crumbs(char *b, uint32_t n) /* b ho
str_cpy(b, "MENU \xB7 ", n);
str_cpy(b + str_len(b), MTAB_NAME[menu_tab()], 12);
str_cpy(b + str_len(b), " \xB7 ", 4);
str_cpy(b + str_len(b), MI_NAME[ui.menu_sel % MI_COUNT], 16);
str_cpy(b + str_len(b), str_nth(MI_NAME, ui.menu_sel % MI_COUNT), 16);
return;
}
if (f == LZ_LAYER) {
@@ -970,7 +970,7 @@ static __attribute__((noinline)) void foot_crumbs(char *b, uint32_t n) /* b ho
uint8_t cnt[8], gi[8];
uint32_t g, p, i, m;
(void)nav_groups(cnt, gi, &g, &p, &i, &m);
str_cpy(b, SEC_NAME[nav_sec()], n);
str_cpy(b, str_nth(SEC_NAME, nav_sec()), n);
str_cpy(b + str_len(b), " \xB7 ", 4);
str_cpy(b + str_len(b), nav_group_name(gi[g]), 16);
str_cpy(b + str_len(b), " \xB7 ", 4);
@@ -1105,9 +1105,10 @@ static __attribute__((noinline)) void draw_crumbs(int32_t y, uint16_t fg, uint16
}
/* (V10.8.54, the owner: "que cada función diga lo que hace") a lens page with OCT+ gestures: its footer says them, 1.5 s
* on entering the page and while OCT+ is held, in place of the breadcrumb. Its page's title, then what OCT+ does */
static const char *const LZ_HINT[] = {"EDIT 1", "HOLD: K4 GAIN", "FILTER", "HOLD: K2 KEY TRK", "REVERB", "HOLD: K4 GATE",
"DLY", "HOLD: K4 GATE", "EUCLID", "MUTATE \xB7 HOLD: K4 EVERY", "PRESETS", "KEEP",
"SCENE", "DICE", "PUNCH IN", "EDITOR", "TRACK GEN", "MAKE", "ARRANGE", "ADD ROW", "TAKE", "GO", "SYSTEM", "OPEN"};
static const char LZ_HINT[] = /* (V10.8.69: packed, str_nth; was a table of pointers) */
"EDIT 1\0" "HOLD: K4 GAIN\0" "FILTER\0" "HOLD: K2 KEY TRK\0" "REVERB\0" "HOLD: K4 GATE\0" "DLY\0"
"HOLD: K4 GATE\0" "EUCLID\0" "MUTATE \xB7 HOLD: K4 EVERY\0" "PRESETS\0" "KEEP\0" "SCENE\0" "DICE\0"
"PUNCH IN\0" "EDITOR\0" "TRACK GEN\0" "MAKE\0" "ARRANGE\0" "ADD ROW\0" "TAKE\0" "GO\0" "SYSTEM\0" "OPEN";
static const char *lz_hint(void)
{
uint32_t i;
@@ -1115,8 +1116,8 @@ static const char *lz_hint(void)
return 0;
if (ui.home) /* (V10.8.56) HOME > VISUAL: OCT+ a new figure */
return home_vis() ? "NEW FIGURE" : 0;
for (i = 0; i < NELEM(LZ_HINT); i += 2u)
if (str_eq(cur_page()->title, LZ_HINT[i])) return LZ_HINT[i + 1u];
for (i = 0; i < 24u; i += 2u)
if (str_eq(cur_page()->title, str_nth(LZ_HINT, i))) return str_nth(LZ_HINT, i + 1u);
return 0;
}
/* (V10.8.65, the owner: "LIFE tiene PAN y no se ve que dice LIFE, la gente no va a entender que está paneando") the knob
@@ -1237,7 +1238,7 @@ static __attribute__((noinline)) void comp_columns(void)
const step_t *cs = &TSEL->step[ui.cursor];
uint32_t a = comp_view(), k = comp_slot(), c = CO_COND(k ? cs->comp2 : cs->comp), l = cs->clen[k & 1u];
char lb[10], un[8];
text_column(0, k ? "ACTION 2" : "ACTION", CA_NAMES[a], a ? VAL(0u) : T_DIM);
text_column(0, k ? "ACTION 2" : "ACTION", str_nth(CA_NAMES, a), a ? VAL(0u) : T_DIM);
if (a) {
fmt_int(val, (int32_t)(l < CL_MAX ? l + 1u : 1u));
hot_unit_column(1, "LENGTH", val, a == CA_RAMP && (comp_arg(cs) & CV_RAMP_BARS) ? "BAR" : "ST");
@@ -1402,7 +1403,7 @@ static void draw_columns(void)
text_column(2, "BARS", val, VAL(2u));
v = row_var(row, song.sel % NTRK);
val[0] = 'T'; val[1] = (char)('1' + song.sel % NTRK); str_cpy(val + 2, " VAR", 5);
text_column(3, val, RV_NAME[v < RV_N ? v : 0], v ? VAL(3u) : T_DIM);
text_column(3, val, str_nth(RV_NAME, v < RV_N ? v : 0), v ? VAL(3u) : T_DIM);
return;
}
if (cur_page()->graph == GR_SONG) {
@@ -2117,7 +2118,7 @@ static void dlg_crumb(const char *a, const char *b) /* "SAVE . NOTICE . CONF
{
int32_t x;
cv_begin(240, LZ_FOOT_H, T_BG);
x = cv_text(6, CRUMB_Y, &AF_X, SEC_NAME[nav_sec()], T_DIM);
x = cv_text(6, CRUMB_Y, &AF_X, str_nth(SEC_NAME, nav_sec()), T_DIM);
x = cv_text(x, CRUMB_Y, &AF_X, " \xB7 ", T_DIM);
x = cv_text(x, CRUMB_Y, &AF_X, a, T_THEME);
x = cv_text(x, CRUMB_Y, &AF_X, " \xB7 ", T_DIM);
+16 -12
View File
@@ -2477,13 +2477,17 @@ static void ui_input_frame(void);
/* (V10.8.22, the owner) MOD: while a slot's SRC or DEST turns, its route in full ("LFO > FILTER CUTOFF"), the engine's own
* names for E1..E8; always (HELP OFF too), the message's 40 frames */
static uint8_t mxn_s; /* the slot turned + 1 (0: none) */
static const char *const MX_SRC_FULL[MS_N] = {"OFF", "LFO", "ENVELOPE", "VELOCITY", "KEY TRACK", "RANDOM", "MOD WHEEL",
"AFTERTOUCH", "EXPRESSION", "MACRO 1", "MACRO 2", "MACRO 3", "MACRO 4", "MOD SEQUENCE", "NOISE", "PROXIMITY", "ENVELOPE 2",
"INPUT LEVEL", "T1 LEVEL", "T2 LEVEL", "T3 LEVEL", "T4 LEVEL", "T5 LEVEL", "T6 LEVEL", "OCT+ KEY", "OCT- KEY"};
static const char *const MX_DST_FULL[MD_N] = {"OFF", "PITCH", "FILTER CUTOFF", "SHAPE", "AMP", "PAN", "DIST SEND",
"CHORUS SEND", "DELAY SEND", "REVERB SEND", "LFO RATE", "VIBRATO", 0, 0, 0, 0, 0, 0, 0, 0, "MASTER CLIP", "MASTER PUNCH",
"DELAY TIME", "DELAY FEEDBACK", "DELAY TONE", "DELAY MIX", "REVERB SIZE", "REVERB DAMP", "CHORUS RATE", "CHORUS DEPTH",
"FX FILTER", "LEVEL", "MACRO 1", "MACRO 2", "MACRO 3", "MACRO 4"};
static const char MX_SRC_FULL[] = /* (V10.8.69: packed, str_nth; was a table of pointers) */
"OFF\0" "LFO\0" "ENVELOPE\0" "VELOCITY\0" "KEY TRACK\0" "RANDOM\0" "MOD WHEEL\0" "AFTERTOUCH\0"
"EXPRESSION\0" "MACRO 1\0" "MACRO 2\0" "MACRO 3\0" "MACRO 4\0" "MOD SEQUENCE\0" "NOISE\0" "PROXIMITY\0"
"ENVELOPE 2\0" "INPUT LEVEL\0" "T1 LEVEL\0" "T2 LEVEL\0" "T3 LEVEL\0" "T4 LEVEL\0" "T5 LEVEL\0"
"T6 LEVEL\0" "OCT+ KEY\0" "OCT- KEY";
static const char MX_DST_FULL[] = /* (V10.8.69: packed, str_nth; was a table of pointers) */
"OFF\0" "PITCH\0" "FILTER CUTOFF\0" "SHAPE\0" "AMP\0" "PAN\0" "DIST SEND\0" "CHORUS SEND\0" "DELAY SEND\0"
"REVERB SEND\0" "LFO RATE\0" "VIBRATO\0" "\0" "\0" "\0" "\0" "\0" "\0" "\0" "\0" "MASTER CLIP\0"
"MASTER PUNCH\0" "DELAY TIME\0" "DELAY FEEDBACK\0" "DELAY TONE\0" "DELAY MIX\0" "REVERB SIZE\0"
"REVERB DAMP\0" "CHORUS RATE\0" "CHORUS DEPTH\0" "FX FILTER\0" "LEVEL\0" "MACRO 1\0" "MACRO 2\0"
"MACRO 3\0" "MACRO 4";
static void mx_banner(void)
{
uint32_t s = mxn_s - 1u, src, dst;
@@ -2493,12 +2497,12 @@ static void mx_banner(void)
if (s >= 4u) return;
src = (uint32_t)clamp(TSEL->p[P_M1SRC + 3u * s], 0, MS_N - 1);
dst = (uint32_t)clamp(TSEL->p[P_M1DST + 3u * s], 0, MD_N - 1);
dn = MX_DST_FULL[dst];
if (!dn) { /* E1..E8: the engine's own label */
dn = str_nth(MX_DST_FULL, dst);
if (!*dn) { /* E1..E8: the engine's own label */
const param_desc_t *d = track_desc(TSEL, P_E0 + (dst - 12u));
dn = d && d->label && d->label[0] != '-' ? d->label : N_MDST[dst];
}
str_cpy(b, MX_SRC_FULL[src], sizeof b);
str_cpy(b, str_nth(MX_SRC_FULL, src), sizeof b);
str_cpy(b + str_len(b), " > ", sizeof b - str_len(b));
str_cpy(b + str_len(b), dn, sizeof b - str_len(b));
ui_say(b, "");
@@ -3239,7 +3243,7 @@ static void panel_setup(void)
fm1_input_edges(0);
for (i = 0; i < NB; i++) {
uint32_t p = 0, id;
setup_show("PRESS", B_NAME[i]);
setup_show("PRESS", str_nth(B_NAME, i));
t0 = fm1_ms;
while (!(p & ~used)) {
fm1_wdt_feed();
@@ -3257,7 +3261,7 @@ static void panel_setup(void)
for (i = 0; i < NE; i++) {
uint32_t e;
int32_t st = 0;
setup_show("TURN RIGHT", E_NAME[i]);
setup_show("TURN RIGHT", str_nth(E_NAME, i));
for (e = 0; e < 7u; e++)
fm1_enc_take(e);
t0 = fm1_ms;
+6 -4
View File
@@ -998,9 +998,11 @@ static uint32_t layer_leds(uint32_t *br)
* the accent, a muted track KEY, unavailable its name DIM, its note under it; KNOBS the four as gauges in their knobs'
* colours over the layer's keys (the keycaps' words); STATE what is on, as chips. (Until 0.8.8: cells with note names,
* the Felucca map.) The keys and knobs do what they did: only the drawing is new */
static const char *const PF_NAME[PF_M1] = {"RPT 1/8", "RPT 1/16", "RPT 1/32", "REVERSE", "FREEZE", /* the audio ones
static const char PF_NAME[] = /* (V10.8.69: packed, str_nth) */ /* the audio ones
* (perform.c; V10.7.59: REVERSE FREEZE, were LPF HPF) */
"OCT-", "OCT+", "1/2 TEMPO", "DEC-", "DEC+", "STUT 1/8", "STUT 1/16", "ATK+", "ARP", "RANDOM"}; /* the MIDI ones (pfx.c) */
"RPT 1/8\0" "RPT 1/16\0" "RPT 1/32\0" "REVERSE\0" "FREEZE\0" "OCT-\0" "OCT+\0" "1/2 TEMPO\0" "DEC-\0"
"DEC+\0" "STUT 1/8\0" "STUT 1/16\0" "ATK+\0" "ARP\0" "RANDOM";
/* the MIDI ones (pfx.c) */
static const char W_NOTE[16] = {'F', 'G', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'A', 'B', 'C', 'D', 'E', 'F', 'G'};
static const char B_NOTE[11] = {'F', 'G', 'A', 'C', 'D', 'F', 'G', 'A', 'C', 'D', 'F'}; /* black keys 1..11: F# G# .. F#5 */
static const uint8_t PK_BLK[11] = {1, 2, 3, 5, 6, 8, 9, 10, 12, 13, 15}; /* a black key: left of white key n */
@@ -1258,7 +1260,7 @@ static const char PD_NM[PD_N][9] = {"M1", "M2", "M3", "M4", "CUT", "FILTER", "PI
static void pk_name(uint32_t e, uint32_t o, char *nm)
{
static const char *const BN[5] = {"LOOP 3", "PITCH UP", "PITCH DN", "TAPE STOP", "STRETCH"};
str_cpy(nm, e < PF_M1 ? PF_NAME[e] : e < PF_M1 + NTRK ? "MUTE T1" : e == PF_STR ? BN[4] : e >= PF_LP3 && e <= PF_TAPE ?
str_cpy(nm, e < PF_M1 ? str_nth(PF_NAME, e) : e < PF_M1 + NTRK ? "MUTE T1" : e == PF_STR ? BN[4] : e >= PF_LP3 && e <= PF_TAPE ?
BN[e - PF_LP3] : e == PF_CLR ? "CLR AUTO" : e == PK_MOD ? PD_NM[PK_DST(o)] : "-", 12);
if (e >= PF_M1 && e < PF_M1 + NTRK) nm[6] = (char)('1' + e - PF_M1);
}
@@ -1568,7 +1570,7 @@ static __attribute__((noinline)) void layer_state(uint32_t l)
lst_chip("LOCK", 0, fx_lock);
lst_chip("FX LATCH", perf_latch_on ? "ON" : "OFF", perf_latch_on);
for (e = 0; e < PF_M1; e++)
lst_chip(PF_NAME[e], 0, (held >> e) & 1u);
lst_chip(str_nth(PF_NAME, e), 0, (held >> e) & 1u);
for (e = 0; e < 5u; e++)
lst_chip(BN[e], 0, (held >> BE[e]) & 1u);
} else if (l == LAYER_GLO) { /* the tracks, the DRUM groups, UNDO */
+2 -1
View File
@@ -33,7 +33,8 @@ static uint32_t pd_cur(void) { return pd_of_fam(PAGES[ui.page].fam); }
/* ------------------------------------------------------------------------------------------- the chains --- */
enum { SEC_HOME, SEC_EDIT, SEC_SEQ, SEC_FX, SEC_GLO, SEC_ENV, SEC_LFO, SEC_SCL, SEC_ARP, SEC_SAVE, SEC_N };
static const char *const SEC_NAME[SEC_N] = {"HOME", "EDIT", "SEQ", "FX", "GLO", "ENV", "LFO", "SCL", "ARP", "SAVE"};
static const char SEC_NAME[] = /* (V10.8.69: packed, str_nth) */
"HOME\0" "EDIT\0" "SEQ\0" "FX\0" "GLO\0" "ENV\0" "LFO\0" "SCL\0" "ARP\0" "SAVE";
static const uint8_t SEC_FAM[SEC_N] = {FAM_HOME, FAM_EDIT, FAM_SEQ, FAM_FX, FAM_GLO, FAM_ENV, FAM_LFO, FAM_SCL, FAM_ARP,
FAM_SAVE};
typedef struct { const char *t, *nm; uint8_t g, lv; } nv_t; /* PAGES title (HOME: 0), the name shown (0: t), group, level */
+1 -1
View File
@@ -317,7 +317,7 @@ static __attribute__((noinline)) void graph_tl(void)
cv_rect(195, y + 1, 1, 10, T_SURF);
cv_rect(196, y + 1, 39, 10, T_ACCENT);
GFX_HOOK_ALIGN(196, y + 1, 235, y + 11, AL_HV, "timeline variation chip");
cv_text_in(196, y + 1 + CAP_IN(X, 10), 39, &AF_X, RV_NAME[v < RV_N ? v : 0], T_INK, T_ACCENT);
cv_text_in(196, y + 1 + CAP_IN(X, 10), 39, &AF_X, str_nth(RV_NAME, v < RV_N ? v : 0), T_INK, T_ACCENT);
}
}
cv_text(4, 128, &AF_X, "KEYS: F3-D4 MUTE \xB7 F4-B4 FROM", T_MID);
+3 -3
View File
@@ -210,7 +210,7 @@ static const char *menu_short(uint32_t row) /* a card's label: the row'
for (k = 0; k < NELEM(SH); k++)
if (SH[k].row == row)
return SH[k].s;
return MI_NAME[row];
return str_nth(MI_NAME, row);
}
static void menu_cards(void)
{
@@ -276,7 +276,7 @@ static __attribute__((noinline)) void menu_panel(void)
if (row == ui.menu_sel)
cv_rect(8, y, 3, h, T_ACCENT);
GFX_HOOK_ALIGN(0, y, 0, y + h, AL_V, "menu row name centred up/down");
cv_text_on(16, y + ty, font, MI_NAME[row], T_TEXT, bg);
cv_text_on(16, y + ty, font, str_nth(MI_NAME, row), T_TEXT, bg);
menu_val(row, v);
cv_text_r(in ? 216 : 226, y + ty, font, v, T_TEXT, bg);
if (in) {
@@ -291,7 +291,7 @@ static __attribute__((noinline)) void menu_panel(void)
char b[32];
str_cpy(b, MTAB_NAME[t], 32);
str_cpy(b + str_len(b), " > ", 32 - str_len(b));
str_cpy(b + str_len(b), MI_NAME[row], 32 - str_len(b));
str_cpy(b + str_len(b), str_nth(MI_NAME, row), 32 - str_len(b));
cv_text(10, 6 - AF_X_CAP_Y, &AF_X, b, T_THEME);
if (!nv)
return;
+15 -7
View File
@@ -172,7 +172,7 @@ UH_SEG static int uh_probe(uint8_t depth, uh_midi_t *m)
cls = d8[4];
if (uh_ctl(0, 0x00, 5, addr, 0, 0, 0, mps) < 0) /* SET_ADDRESS */
return 0;
uh_wait(10);
uh_wait(20); /* (V10.8.69) 20 ms: some keyboards take more than 10 */
r = uh_ctl(addr, 0x80, 6, 0x0200, 0, 9, uh_cfg, mps);
if (r < 9)
return 0;
@@ -348,12 +348,20 @@ UH_SEG static void uh_connect(void) /* a device on th
uh.tried = 1;
return;
}
sie_wr(S_POWER, 0x08u); /* bus reset */
uh_wait(30);
sie_wr(S_POWER, 0);
uh_wait(30);
uh.next_addr = UH_FIRST_ADDR;
if (uh_probe(0, &m)) {
int ok = 0;
for (uint32_t k = 0; ; k++) { /* (V10.8.69) three tries, a bus reset and a longer recovery
* each: a keyboard slow to answer after its reset is not
* "NOT USB MIDI" on the first unanswered request */
sie_wr(S_POWER, 0x08u); /* bus reset */
uh_wait(30);
sie_wr(S_POWER, 0);
uh_wait(30 + 70 * k);
uh.next_addr = UH_FIRST_ADDR;
ok = uh_probe(0, &m);
if (ok || k == 2u)
break;
}
if (ok) {
uh_start_ep(&m);
uh.msg = uh.aud ? UH_MSG_AUDIO : UH_MSG_MIDI;
uh.tried = 0;
+9 -7
View File
@@ -35,7 +35,10 @@ static int uh_parse_midi(const uint8_t *d, uint32_t len, uh_midi_t *m)
if (d[i + 1] == 2u && l >= 9u) {
cfg = d[i + 5];
} else if (d[i + 1] == 4u && l >= 9u) {
if (m->found) break; /* never combine interfaces or alternate settings */
if (m->found && m->in_ep) break; /* never combine interfaces or alternate settings */
if (m->found) /* (V10.8.69) an OUT-only MIDI interface before the one with
* the keyboard's IN: forgotten, keep looking */
*m = (uh_midi_t){0};
m->cfg = cfg;
m->iface = d[i + 2];
m->alt = d[i + 3];
@@ -43,21 +46,20 @@ static int uh_parse_midi(const uint8_t *d, uint32_t len, uh_midi_t *m)
} else if (d[i + 1] == 5u && l >= 7u && in_midi) {
uint8_t ea = d[i + 2], type = d[i + 3] & 3u;
uint16_t mps = (uint16_t)(d[i + 4] | d[i + 5] << 8);
/* Full-speed USB-MIDI 1.0 events are four bytes. The buffers hold at most 64 bytes. */
if ((ea & 15u) && !(ea & 0x70u) && mps >= 4u && mps <= 64u &&
((type == 2u && (mps == 8u || mps == 16u || mps == 32u || mps == 64u)) ||
(type == 3u && d[i + 6]))) {
/* Full-speed USB-MIDI 1.0 events are four bytes. The buffers hold at most 64 bytes. (V10.8.69: any bulk
* size of whole events, an interrupt one with bInterval 0 polled every frame) */
if ((ea & 15u) && !(ea & 0x70u) && mps >= 4u && mps <= 64u && (type == 2u || type == 3u)) {
if ((ea & 0x80u) && !m->in_ep) {
m->found = 1;
m->in_ep = ea & 0x0Fu;
m->in_type = type;
m->in_interval = d[i + 6];
m->in_interval = d[i + 6] ? d[i + 6] : 1u;
m->in_mps = mps;
} else if (!(ea & 0x80u) && !m->out_ep) {
m->found = 1;
m->out_ep = ea & 0x0Fu;
m->out_type = type;
m->out_interval = d[i + 6];
m->out_interval = d[i + 6] ? d[i + 6] : 1u;
m->out_mps = mps & ~3u; /* send whole event packets only */
}
}
+1 -1
View File
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
else if (!mu && gs.role[t2] == RL_TEX && t2 == gs.trk_of[RL_TEX]) printf(" (TEX)");
if (row_src(k, t2, chain_config.row[k].slot) != chain_config.row[k].slot)
printf("<%c", 'A' + row_src(k, t2, chain_config.row[k].slot));
if (row_var(k, t2)) printf("[%s]", RV_NAME[row_var(k, t2)]);
if (row_var(k, t2)) printf("[%s]", str_nth(RV_NAME, row_var(k, t2)));
}
if (sc->mute >> 4) printf(" drum groups out: %s%s%s%s", sc->mute & 0x10u ? "K" : "", sc->mute & 0x20u ? "S" : "",
sc->mute & 0x40u ? "H" : "", sc->mute & 0x80u ? "P" : "");
+1 -1
View File
@@ -31,7 +31,7 @@ int main(void)
ui_power_on();
{ /* (V10.8.40) MOOD MID: the pieces V10.8.39's, byte for byte (from power-on: the tracks' values and steps, the
* song's, the kit; a checksum of 8 seeds in EXPLORE, RANDOM and HOUSE; V10.8.39's own, the same tool) */
static const uint32_t MID[3] = {0xc0d93e12u, 0xcbe5be06u, 0x3c5eb14fu}; /* (V10.8.68 recorded again: JIANT BYTE 09ec6b57 / 77f2b602's generator, the kits shorter and less driven, EXPLORE's field and voices; V10.8.51: a genre's headroom, GTRIM; V10.8.48: the envelopes by role, the filter types; V10.8.47: JAZZ's hats; V10.8.46 recorded again: a part never still; V10.8.45: the envelopes' rules; V10.8.42 too; V10.8.41: the generator rewritten genre by genre:
static const uint32_t MID[3] = {0x43055cabu, 0x37679e26u, 0x5a231927u}; /* (V10.8.69 recorded again: JIANT BYTE's song plans (gsong), its sections' timbre moving, gen_post without the call and response, the kits' punch back; V10.8.68: JIANT BYTE 09ec6b57 / 77f2b602's generator, the kits shorter and less driven, EXPLORE's field and voices; V10.8.51: a genre's headroom, GTRIM; V10.8.48: the envelopes by role, the filter types; V10.8.47: JAZZ's hats; V10.8.46 recorded again: a part never still; V10.8.45: the envelopes' rules; V10.8.42 too; V10.8.41: the generator rewritten genre by genre:
* this version's own pieces, recorded with GEN_MID=1; a change to the generator records them again) */
uint32_t md, hs = 0, r, i;
for (r = 1; r <= NGENRE; r++) if (str_eq(GENRE[r - 1u].name, "HOUSE")) hs = r;
+3 -6
View File
@@ -1323,8 +1323,7 @@ int main(void)
printf("gen: the drums' share at most %.1f %% (%s); the mix %.1f dBFS RMS on average, the leveler's gain off its range %u times\n",
100 * worst, wn, rms_db / n, lev_bad);
bad += gcheck("(0.9.9-gen3) every genre x 2: the drums in front, 97 % of the parts' energy at most (p3), the leveler in its range, the mix loud",
!over && !lev_bad && rms_db / n >= -22.5); /* (V10.8.68, BYTE 77f2b602: the kits shorter and a third as
* driven: -22.0 measured, -22.5 asked, was -21.0) */ /* (V10.8.51: a genre's headroom, GTRIM: no piece over
!over && !lev_bad && rms_db / n >= -21.0); /* (V10.8.69: the kits' punch back, -21.0 asked again; V10.8.68: -22.5) */ /* (V10.8.51: a genre's headroom, GTRIM: no piece over
* -1 dBFS before the master, the limiter no longer squashing it: the
* mix -20.5 measured, -21.0 asked, was -16.0 asked) */ /* (V10.8.41, the owner: the basses under the drums in ten
* genres, jazz's cymbals down: -15.6 on average, was -15.5 asked;
@@ -1405,8 +1404,7 @@ int main(void)
printf("gen: the mix pass: %u electronic pieces, the bass over 10 dB under the drums %u, a melodic part over 25 dB under %u, a part 3 dB over the drums %u, lists moved %u, MINIMAL's sub under 6 dB over %u\n",
n, bass_bad, mel_bad, front_bad, list_bad, sub_bad);
bad += gcheck("(the GENE mix pass) the electronic genres x 3: the bass and the melodic parts heard, the drums in front (MINIMAL's sub over them), the presets' lists kept",
n >= 30u && bass_bad <= 2u && mel_bad <= 2u && front_bad <= 8u && !list_bad && !sub_bad); /* (V10.8.68, BYTE 77f2b602's lighter kits: 8 parts 3 dB
* over them, was 4: 4 asked, now 8) */ /* (V10.7.56: 3, was 2: no voice taken from a pad any more, IDM GLITCH's +3.3 dB;
n >= 30u && bass_bad <= 2u && mel_bad <= 2u && front_bad <= 4u && !list_bad && !sub_bad); /* (V10.8.69: the kits' punch back, 4 asked again; V10.8.68: 8) */ /* (V10.7.56: 3, was 2: no voice taken from a pad any more, IDM GLITCH's +3.3 dB;
* V10.8.48: the envelopes by role, a bass's sustain 68 % at most: two
* basses ~11 dB under (WEST's, DEEP HOUSE's), EBM's sequenced bass over:
* 2 and 4, were 1 and 3) */
@@ -1650,8 +1648,7 @@ int main(void)
}
}
} else if (gi == 1u) {
heavy += !rom && d->p[P_DIST] >= 16 && b->p[P_DIST] >= 30; /* (V10.8.68, BYTE's "too much distortion": the
* heavy kits' DIST 16 .. 30, was 40 .. 60) */
heavy += !rom && d->p[P_DIST] >= 40 && b->p[P_DIST] >= 30; /* (V10.8.69: the heavy kits' DIST 40 .. 60 again) */
if (gs.act[RL_ARP]) {
const track_t *ar = &trk[gs.trk_of[RL_ARP]];
for (p = 0; p < (uint32_t)ar->p[P_SLEN] && ar->step[p].time != ST_NOTE; p++) {}
+24 -24
View File
@@ -2727,7 +2727,7 @@ static int test_display_preferences(void)
bad += check("the expanded menu retains all three SPEAKER modes (OCT+ / OCT- step them, stopping at the ends)",
k && settings.lowcut == 0 && !fx_lowcut && ui.menu == 1);
{ /* #42: SPEAKER EQ FLAT (the old OFF, stored 0) LOWCUT BASS+; KNOB 1 steps them, the audio follows at once */
int ok = str_eq(MI_NAME[MI_LOWCUT], "SPEAKER EQ") && str_eq(SPK_EQ[0], "FLAT") && str_eq(SPK_EQ[1], "LOWCUT") &&
int ok = str_eq(str_nth(MI_NAME, MI_LOWCUT), "SPEAKER EQ") && str_eq(SPK_EQ[0], "FLAT") && str_eq(SPK_EQ[1], "LOWCUT") &&
str_eq(SPK_EQ[2], "BASS+");
turn(EN_K1, 1); ok &= settings.lowcut == 1u && fx_lowcut == 1u;
turn(EN_K1, 1); ok &= settings.lowcut == 2u && fx_lowcut == 2u;
@@ -2991,7 +2991,7 @@ static int test_menu_tabs(void)
ui_power_on();
memset(&favorites.factory[6][24], 0, 8);
bt_up = 0;
ok = MI_TAB[MI_BT] == MTAB_SYSTEM && MI_BT < MI_VALUES && str_eq(MI_NAME[MI_BT], "BLUETOOTH") && menu_get(MI_BT) == 0u &&
ok = MI_TAB[MI_BT] == MTAB_SYSTEM && MI_BT < MI_VALUES && str_eq(str_nth(MI_NAME, MI_BT), "BLUETOOTH") && menu_get(MI_BT) == 0u &&
str_eq(menu_vname(MI_BT, 0), "OFF") && menu_n(MI_BT) == 3u;
song.playing = 1;
menu_put(MI_BT, 1u);
@@ -4752,7 +4752,7 @@ static int chain_walk(uint32_t btn, const char *const *want, uint32_t n, const c
frames(2);
}
if (!str_eq(nav_name(), want[i])) {
printf(" %s: %s, wanted %s\n", SEC_NAME[nav_sec()], nav_name(), want[i]);
printf(" %s: %s, wanted %s\n", str_nth(SEC_NAME, nav_sec()), nav_name(), want[i]);
ok = 0;
}
}
@@ -4763,7 +4763,7 @@ static int chain_walk(uint32_t btn, const char *const *want, uint32_t n, const c
for (i = 0; i < nt; i++) {
press(btn); frames(320);
if (!str_eq(nav_name(), taps[i])) {
printf(" %s tap: %s, wanted %s\n", SEC_NAME[nav_sec()], nav_name(), taps[i]);
printf(" %s tap: %s, wanted %s\n", str_nth(SEC_NAME, nav_sec()), nav_name(), taps[i]);
ok = 0;
}
}
@@ -6194,7 +6194,7 @@ static int test_large_face(void)
uint32_t i, missing = 0;
const char *s;
for (i = 0; i < NB + NE + 2u; i++) /* ui_input.c setup_show: the control names */
for (s = i < NB ? B_NAME[i] : i < NB + NE ? E_NAME[i - NB] : FIXED[i - NB - NE]; *s; s++)
for (s = i < NB ? str_nth(B_NAME, i) : i < NB + NE ? str_nth(E_NAME, i - NB) : FIXED[i - NB - NE]; *s; s++)
missing += glyph_at(&AF_L, (uint8_t)*s) < 0;
return check("the L face holds every glyph of the strings drawn in it", !missing);
}
@@ -7058,7 +7058,7 @@ static int test_screen_off(void)
int16_t *vp, v0;
ui_power_on();
ok = ui_scr == 0u && scr_get() == 0u && SCR_MIN[scr_get()] == 0u && str_eq(MI_NAME[MI_SCROFF], "SCREEN OFF") &&
ok = ui_scr == 0u && scr_get() == 0u && SCR_MIN[scr_get()] == 0u && str_eq(str_nth(MI_NAME, MI_SCROFF), "SCREEN OFF") &&
MI_TAB[MI_SCROFF] == MTAB_DISPLAY && menu_n(MI_SCROFF) == 5u && str_eq(menu_vname(MI_SCROFF, 0), "NEVER") &&
str_eq(menu_vname(MI_SCROFF, 1), "5 MIN") && str_eq(menu_vname(MI_SCROFF, 2), "15 MIN") &&
str_eq(menu_vname(MI_SCROFF, 3), "30 MIN") && str_eq(menu_vname(MI_SCROFF, 4), "60 MIN") &&
@@ -7067,7 +7067,7 @@ static int test_screen_off(void)
{ /* (V10.8.56, the owner) MENU > DISPLAY > SAVER: 3 MIN by default; untouched that long, HOME > VISUAL's figure the
* whole screen, moving; a button brings the page back and is swallowed (its page not opened), as SCREEN OFF's wake */
static uint16_t a[240 * 120];
ok = str_eq(MI_NAME[MI_SAVER], "SAVER") && MI_TAB[MI_SAVER] == MTAB_DISPLAY && menu_n(MI_SAVER) == 5u &&
ok = str_eq(str_nth(MI_NAME, MI_SAVER), "SAVER") && MI_TAB[MI_SAVER] == MTAB_DISPLAY && menu_n(MI_SAVER) == 5u &&
menu_get(MI_SAVER) == 2u && str_eq(menu_vname(MI_SAVER, 2), "3 MIN") && str_eq(menu_vname(MI_SAVER, 0), "OFF");
menu_put(MI_SAVER, 1u); /* 1 MIN */
ok &= menu_get(MI_SAVER) == 1u && str_eq(menu_vname(MI_SAVER, 1), "1 MIN");
@@ -7275,7 +7275,7 @@ static int test_scale_leds(void)
t->p[P_ROOT] = 0;
settings_leds = LEDS_DIM;
ui_leds();
ok = !menu_get(MI_SCLLED) && str_eq(MI_NAME[MI_SCLLED], "SCALE LEDS") && MI_TAB[MI_SCLLED] == MTAB_CONTROL &&
ok = !menu_get(MI_SCLLED) && str_eq(str_nth(MI_NAME, MI_SCLLED), "SCALE LEDS") && MI_TAB[MI_SCLLED] == MTAB_CONTROL &&
!scale_leds(&root) && lit_keys(fm1_led_dim) == ALL && !lit_keys(fm1_led_hi);
bad += check("#127 SCALE LEDS OFF (the default): every key glows as before (0.6.96: DIM HI's level above empty)", ok);
menu_put(MI_SCLLED, menu_step(MI_SCLLED, 1));
@@ -7459,7 +7459,7 @@ static int test_layer_knob_leak(void)
if (!ok) {
fails++;
if (fails < 6u)
printf("ui: leak: %s scenario %u page %s\n", B_NAME[LB[b]], sc,
printf("ui: leak: %s scenario %u page %s\n", str_nth(B_NAME, LB[b]), sc,
pg < NPAGES ? PAGES[pg].title : "HOME");
}
if (b == 0u && pg < NPAGES && PAGES[pg].graph == GR_ARP && trk[0].p[P_AMODE] == lk_p[0][P_AMODE])
@@ -7689,7 +7689,7 @@ static int test_layer_knob_race(void)
if (!ok) {
fails++;
if (fails < 6u)
printf("ui: race: %s mode %u KNOB %u page %s\n", B_NAME[LB[l]], mode, k + 1u,
printf("ui: race: %s mode %u KNOB %u page %s\n", str_nth(B_NAME, LB[l]), mode, k + 1u,
pg < NPAGES ? PAGES[pg].title : "HOME");
}
}
@@ -9983,7 +9983,7 @@ static int test_usb_level(void)
int bad = 0, ok;
ui_power_on();
frame();
ok = !fx_usb_fixed && str_eq(MI_NAME[MI_USB], "USB LEVEL") && str_eq(menu_vname(MI_USB, 0), "MASTER") && menu_n(MI_USB) == 6u;
ok = !fx_usb_fixed && str_eq(str_nth(MI_NAME, MI_USB), "USB LEVEL") && str_eq(menu_vname(MI_USB, 0), "MASTER") && menu_n(MI_USB) == 6u;
hold(B_HOME);
ui.menu_sel = MI_USB;
ui.force = 1; ui_draw();
@@ -10432,7 +10432,7 @@ static int test_click_menu(void)
ui_power_on();
frame();
ok = !ui_rec_prefs && click_mode == CLICK_OFF && click_lvl == 1u && !cin_bars &&
str_eq(MI_NAME[MI_CLICK], "CLICK") && str_eq(MI_NAME[MI_CLKLVL], "CLICK LEVEL") && str_eq(MI_NAME[MI_COUNTIN], "COUNT-IN") &&
str_eq(str_nth(MI_NAME, MI_CLICK), "CLICK") && str_eq(str_nth(MI_NAME, MI_CLKLVL), "CLICK LEVEL") && str_eq(str_nth(MI_NAME, MI_COUNTIN), "COUNT-IN") &&
MI_TAB[MI_CLICK] == MTAB_AUDIO && MI_TAB[MI_CLKLVL] == MTAB_AUDIO && MI_TAB[MI_COUNTIN] == MTAB_AUDIO &&
menu_get(MI_CLICK) == 0u && menu_get(MI_CLKLVL) == 1u && menu_get(MI_COUNTIN) == 0u;
for (i = 0; i < 3u; i++)
@@ -10864,7 +10864,7 @@ static int test_midi_learn(void)
trk[0].p[P_LEVEL] = 10;
midi_event(0xB0, 0, 7, 127); /* (ROUT CH1-6: channel 1 plays T1) */
lv = (uint32_t)trk[0].p[P_LEVEL];
ok = lv > 10u && ml_map() == MLM_FACTORY && str_eq(MI_NAME[MI_MIDIMAP], "MIDI MAP") && menu_n(MI_MIDIMAP) == 3u &&
ok = lv > 10u && ml_map() == MLM_FACTORY && str_eq(str_nth(MI_NAME, MI_MIDIMAP), "MIDI MAP") && menu_n(MI_MIDIMAP) == 3u &&
str_eq(menu_vname(MI_MIDIMAP, 0), "FACTORY") && str_eq(menu_vname(MI_MIDIMAP, 1), "CUSTOM ADD") &&
str_eq(menu_vname(MI_MIDIMAP, 2), "CUSTOM") && menu_n(MI_LEARN) == 4u && str_eq(menu_vname(MI_LEARN, 3), "CLEAR ALL");
if (!ok) printf(" lv %u map %u n %u '%s' '%s' '%s' %u '%s'\n", lv, ml_map(), menu_n(MI_MIDIMAP), menu_vname(MI_MIDIMAP, 0), menu_vname(MI_MIDIMAP, 1), menu_vname(MI_MIDIMAP, 2), menu_n(MI_LEARN), menu_vname(MI_LEARN, 3));
@@ -11079,7 +11079,7 @@ static int test_usb_serial(void)
ui_power_on();
usb.up = 0; /* (no SIE here: usb_cdc_switch only flips the descriptors) */
frame();
ok = usb_cdc_on && dev_class() == 0xEF && !(ui_prefs & PREF_SERIAL_OFF) && !usb_out && str_eq(MI_NAME[MI_SERIAL], "USB") &&
ok = usb_cdc_on && dev_class() == 0xEF && !(ui_prefs & PREF_SERIAL_OFF) && !usb_out && str_eq(str_nth(MI_NAME, MI_SERIAL), "USB") &&
menu_n(MI_SERIAL) == 5u && str_eq(menu_vname(MI_SERIAL, 0), "CONSOLE") && str_eq(menu_vname(MI_SERIAL, 1), "STEREO") &&
str_eq(menu_vname(MI_SERIAL, 2), "STEMS") && str_eq(menu_vname(MI_SERIAL, 3), "IN+OUT") &&
str_eq(menu_vname(MI_SERIAL, 4), "STEMS+IN"); /* (0.7.1: USB SERIAL ON / OFF became USB CONSOLE / STEREO /
@@ -11226,7 +11226,7 @@ static int test_bpm_lock(void)
ui.force = 1; ui_draw();
b0 = song.g[G_BPM];
turn(EN_SELECT, 3);
ok = str_eq(MI_NAME[MI_BPMLOCK], "BPM LOCK") && ui.menu == 1u && song.g[G_BPM] == b0; /* (the menu: no tempo) */
ok = str_eq(str_nth(MI_NAME, MI_BPMLOCK), "BPM LOCK") && ui.menu == 1u && song.g[G_BPM] == b0; /* (the menu: no tempo) */
ok &= ui.menu_sel == MI_BPMLOCK + 3u; /* (0.9.2: SELECT the rows) */
ui.menu_sel = MI_BPMLOCK;
turn(EN_K1, 1); ok &= (ui_prefs & PREF_BPM_LOCK) != 0u; /* right: ON */
@@ -11383,7 +11383,7 @@ static int test_large(void)
frame();
ok = !(ui_prefs & PREF_LARGE) && large_kind() == LK_OFF && card_h() == LZ_CARD_H && graph_y() == LZ_GRAPH_Y; /* (HOME's
* lens) */
ok &= MI_LARGE == MI_SCOPE + 1u && str_eq(MI_NAME[MI_LARGE], "LARGE") && menu_flag(MI_LARGE) &&
ok &= MI_LARGE == MI_SCOPE + 1u && str_eq(str_nth(MI_NAME, MI_LARGE), "LARGE") && menu_flag(MI_LARGE) &&
str_eq(menu_flag(MI_LARGE)->name[0], "OFF") && str_eq(menu_flag(MI_LARGE)->name[1], "ON");
ui.force = 1; frame();
memcpy(off, host_screen, sizeof off);
@@ -11524,9 +11524,9 @@ static int test_skin(void)
frame();
/* (V10.7.23, the owner) SKIN retired: COLORS the one skin, no row in MENU > DISPLAY; its byte (engine 15, byte 20) read
* and written 0 (COLORS, as older firmware reads it), whatever was saved (3 AIR, 1 BOTTOM, 2 HUD) */
ok = MI_SCOPE == MI_COLOR + 1u && str_eq(MI_NAME[MI_SCOPE], "SCOPE") && MI_TAB[MI_SCOPE] == MTAB_DISPLAY;
ok = MI_SCOPE == MI_COLOR + 1u && str_eq(str_nth(MI_NAME, MI_SCOPE), "SCOPE") && MI_TAB[MI_SCOPE] == MTAB_DISPLAY;
for (i = 0; i < MI_COUNT; i++)
ok &= !str_eq(MI_NAME[i], "SKIN");
ok &= !str_eq(str_nth(MI_NAME, i), "SKIN");
bad += check("SKIN retired: no SKIN row in MENU > DISPLAY (COLOR, then SCOPE)", ok);
{
persist_t p, q;
@@ -11738,7 +11738,7 @@ static int test_scope(void)
int bad = 0, ok;
uint32_t e, sk, nseen = 0;
ui_power_on(); frame();
ok = ui_scope == 0u && MI_SCOPE == MI_COLOR + 1u && str_eq(MI_NAME[MI_SCOPE], "SCOPE") && MI_TAB[MI_SCOPE] == MTAB_DISPLAY &&
ok = ui_scope == 0u && MI_SCOPE == MI_COLOR + 1u && str_eq(str_nth(MI_NAME, MI_SCOPE), "SCOPE") && MI_TAB[MI_SCOPE] == MTAB_DISPLAY &&
menu_n(MI_SCOPE) == 2u && str_eq(menu_vname(MI_SCOPE, 0), "OFF") && str_eq(menu_vname(MI_SCOPE, 1), "ON") &&
menu_get(MI_SCOPE) == 0u;
hold(B_HOME); ui.menu_sel = MI_SCOPE;
@@ -11826,7 +11826,7 @@ static int test_menu_prefs(void)
bad += check("0.9.2 MENU: SELECT reaches every row, ALGORITHM each tab's first, each tab a page of its own (was PRESETS)", ok);
/* ANIM */
ui.menu_sel = MI_ANIM;
ok = str_eq(MI_NAME[MI_ANIM], "ANIM") && !(ui_prefs & PREF_ANIM_OFF);
ok = str_eq(str_nth(MI_NAME, MI_ANIM), "ANIM") && !(ui_prefs & PREF_ANIM_OFF);
turn(EN_K1, 1); ok &= !(ui_prefs & PREF_ANIM_OFF); /* right: ON (stays: the default) */
turn(EN_K1, -1); ok &= (ui_prefs & PREF_ANIM_OFF) != 0; /* left: OFF */
turn(EN_K1, 1); ok &= !(ui_prefs & PREF_ANIM_OFF); /* right: ON (the switch's knob right) */
@@ -11886,7 +11886,7 @@ static int test_style(void)
ui_power_on();
frame();
for (ok = 1, i = 0; i < MI_COUNT; i++)
ok &= !str_eq(MI_NAME[i], "STYLE");
ok &= !str_eq(str_nth(MI_NAME, i), "STYLE");
ok &= MI_COLOR == 0u && MI_SCOPE == 1u && MI_LARGE == 2u && MI_ANIM == 3u && MI_LEDS == 4u && MI_SCROFF == 5u && MI_SAVER == 6u &&
MI_HELP == 7u && MI_PRSCR == 8u && MI_LCD == 9u && MI_HOLD == 10u && mtab_rows(MTAB_DISPLAY) == 10u && /* (V10.7.81: PRESETS; V10.8.63: PANEL) */ mtab_first(MTAB_CONTROL) == MI_HOLD;
bad += check("MENU: no STYLE row, no SKIN row (FLAT and COLORS the ones); DISPLAY's six rows, the rest renumbered in order", ok);
@@ -13291,7 +13291,7 @@ static int test_coherence(void)
same &= in;
}
if (any && same && !coh_ok(sec, coh_name(sec, v[i]), coh_name(sec, v[i + 1u]))) {
printf(" %s %s: %s and %s, neighbours, the same parameters\n", ENGINES[ee]->name, SEC_NAME[sec],
printf(" %s %s: %s and %s, neighbours, the same parameters\n", ENGINES[ee]->name, str_nth(SEC_NAME, sec),
coh_name(sec, v[i]), coh_name(sec, v[i + 1u]));
ok = 0;
}
@@ -13301,7 +13301,7 @@ static int test_coherence(void)
for (k = 0; k < 4u; k++)
for (m = 0; m < 4u; m++)
if (key[i][k] && key[i][k] == key[j][m] && !coh_ok(sec, coh_name(sec, v[i]), coh_name(sec, v[j]))) {
printf(" %s %s: parameter %u on %s and %s\n", ENGINES[ee]->name, SEC_NAME[sec], key[i][k],
printf(" %s %s: parameter %u on %s and %s\n", ENGINES[ee]->name, str_nth(SEC_NAME, sec), key[i][k],
coh_name(sec, v[i]), coh_name(sec, v[j]));
ok = 0;
}
@@ -13316,7 +13316,7 @@ static int test_coherence(void)
!nav_put(SEC_GLO, "RAILS") && !nav_put(SEC_GLO, "MANO") && !nav_put(SEC_ENV, "TRACKS DEST") &&
nav_put(SEC_EDIT, "PLAY") && !nav_put(SEC_EDIT, "VOICE") && !nav_put(SEC_EDIT, "STEREO");
for (i = 0; i < MI_COUNT; i++)
ok &= !str_eq(MI_NAME[i], "INIT SYSTEM"); /* (one action, one name: SAVE > TOOLS > CLEAR PROJECT) */
ok &= !str_eq(str_nth(MI_NAME, i), "INIT SYSTEM"); /* (one action, one name: SAVE > TOOLS > CLEAR PROJECT) */
go_title("MASTER"); frame();
ok &= str_eq(page_desc(cur_page(), 1, &hv)->label, "PUNCH"); /* (the drums' punch: the master's own) */
for (i = 0; i < NPAGES; i++)
+32
View File
@@ -85,6 +85,38 @@ int main(void)
check("44.1 and 48 kHz: 44.1 kept (no conversion)", uh_parse_uac(UM2, sizeof UM2, &a) && !a.r48);
check("a keyboard is no audio input", !uh_parse_uac(KBD, sizeof KBD, &a));
}
{ /* (V10.8.69) shapes real keyboards use that the parser used to refuse ("NOT USB MIDI") */
static const uint8_t OUTFIRST[] = {9, 2, 0, 0, 2, 1, 0, 0x80, 50,
9, 4, 0, 0, 1, 1, 3, 0, 0,
7, 5, 0x01, 2, 64, 0, 0,
9, 4, 1, 0, 1, 1, 3, 0, 0,
7, 5, 0x81, 2, 64, 0, 0};
static const uint8_t INT0[] = {9, 2, 0, 0, 1, 1, 0, 0x80, 50,
9, 4, 0, 0, 1, 1, 3, 0, 0,
7, 5, 0x81, 3, 8, 0, 0};
static const uint8_t BULK48[] = {9, 2, 0, 0, 1, 1, 0, 0x80, 50,
9, 4, 0, 0, 1, 1, 3, 0, 0,
7, 5, 0x82, 2, 48, 0, 0};
/* MPK mini mk3-like: audio control, MIDI streaming with jacks, 9-byte endpoints and their class ones */
static const uint8_t MPK[] = {9, 2, 0, 0, 2, 1, 0, 0x80, 50,
9, 4, 0, 0, 0, 1, 1, 0, 0,
9, 0x24, 1, 0, 1, 9, 0, 1, 1,
9, 4, 1, 0, 2, 1, 3, 0, 0,
7, 0x24, 1, 0, 1, 0x41, 0,
6, 0x24, 2, 1, 1, 0,
9, 5, 0x01, 2, 64, 0, 0, 0, 0,
5, 0x25, 1, 1, 1,
9, 5, 0x81, 2, 64, 0, 0, 0, 0,
5, 0x25, 1, 1, 3};
uh_midi_t m;
check("an OUT-only MIDI interface first: the next one's IN taken", uh_parse_midi(OUTFIRST, sizeof OUTFIRST, &m) &&
m.iface == 1 && m.in_ep == 1 && !m.out_ep);
check("interrupt IN with bInterval 0: taken, polled every frame", uh_parse_midi(INT0, sizeof INT0, &m) &&
m.in_ep == 1 && m.in_type == 3 && m.in_interval == 1);
check("bulk IN of 48 bytes: taken", uh_parse_midi(BULK48, sizeof BULK48, &m) && m.in_ep == 2 && m.in_mps == 48);
check("MPK mini mk3-like: iface 1, IN 1, OUT 1", uh_parse_midi(MPK, sizeof MPK, &m) && m.iface == 1 &&
m.in_ep == 1 && m.out_ep == 1 && m.in_mps == 64);
}
printf("usbhost: %s\n", bad ? "FAILED" : "all ok");
return bad != 0;
}
+1 -1
View File
@@ -284,7 +284,7 @@ int main(void)
setup();
VEL_SET = VEL_SET2 = 0;
ck("6. MENU > CONTROL: VELOCITY, VEL MIN, AFTERTOUCH, VEL LEARN; an older setting NORMAL, 20, 5 (V10.7.23: OFF 1..10, MID = 5), ON",
MI_TAB[MI_VEL] == MTAB_CONTROL && MI_TAB[MI_VLEARN] == MTAB_CONTROL && str_eq(MI_NAME[MI_VEL], "VELOCITY") &&
MI_TAB[MI_VEL] == MTAB_CONTROL && MI_TAB[MI_VLEARN] == MTAB_CONTROL && str_eq(str_nth(MI_NAME, MI_VEL), "VELOCITY") &&
str_eq(menu_vname(MI_VEL, menu_get(MI_VEL)), "NORMAL") && str_eq(menu_vname(MI_VELMIN, menu_get(MI_VELMIN)), "20") &&
str_eq(menu_vname(MI_AT, menu_get(MI_AT)), "5") && str_eq(menu_vname(MI_VLEARN, menu_get(MI_VLEARN)), "ON") &&
menu_n(MI_VEL) == 4u && menu_n(MI_VELMIN) == 8u && menu_n(MI_AT) == 11u && menu_n(MI_VLEARN) == 3u);
+1 -1
View File
@@ -185,7 +185,7 @@ static void check_cache(void)
sing_init();
for (k = 0; k < LYB_N; k++) {
char word[20];
const char *q = k < LYB_SCAT ? ly_word(&LY_BANK[1], k, word) : k < LYB_N - 1u ? SCAT_EN[k - LYB_SCAT] : VOCABLE[1];
const char *q = k < LYB_SCAT ? ly_word(&LY_BANK[1], k, word) : k < LYB_N - 1u ? str_nth(SCAT_EN, k - LYB_SCAT) : VOCABLE[1];
if (!lyb_at[k]) miss++;
else {
bad_b += !entry_is(&lyb_ph[lyb_at[k] - 1u], q, 64u);
+2241 -2240
View File
File diff suppressed because it is too large. Load diff
+24 -22
View File
@@ -166,7 +166,7 @@ cm_one 894 text
comp_any 22 text
comp_arg 20 text comp_slot
comp_col 60 text
comp_columns 1582 text comp_arg comp_slot comp_view empty_column fmt_int hot_unit_column motion_lock_at str_cpy str_len text_column tsel_p unit_column val_col
comp_columns 1592 text comp_arg comp_slot comp_view empty_column fmt_int hot_unit_column motion_lock_at str_cpy str_len str_nth text_column tsel_p unit_column val_col
comp_knob 1022 text chain_busy comp_slot comp_view cond_at cond_idx motion_lock_at tsel_p ui_message
comp_legacy 26 text
comp_migrate 298 text cm_one
@@ -239,7 +239,7 @@ dlen 18 text
dlevel 150 text
dlg_button 134 text cv_rect cv_rrect cv_text_on
dlg_card 34 text card_line
dlg_crumb 130 text cv_begin cv_blit cv_text nav_sec
dlg_crumb 134 text cv_begin cv_blit cv_text nav_sec str_nth
dlg_on 28 text
dlg_tabs 30 text tabs_paint
dly_grain 198 hot_text
@@ -356,7 +356,7 @@ ed_eng 4 text
ed_flash_stop 90 text chain_busy fm1_wdt_feed transport_busy
ed_fm6_handle 1510 text ed_b ed_flash_stop ed_fm6_name ed_str fm6_adopt fm6_bank_slot fm6_neutral fm6_pack fm6_set_patch fm6_unpack fvb_commit fvb_prog fvb_read fvb_stage fvb_tx_ok fvb_user fvb_valid gz_get memcpy memset st_crc32_add st_current st_erase st_read upf_fm6 upf_get upf_pk_get upf_pk_put upf_save upf_set
ed_fm6_name 64 text ed_str
ed_handle 7140 text apply_preset bt_hw_seg chain_busy chain_defaults chain_prepare_at chain_valid desc_unit ed_args_ok ed_b ed_begin ed_bk_object ed_bk_r32 ed_bk_u32 ed_bk_write ed_desc ed_eng ed_flash_stop ed_fm6_handle ed_known ed_load_after ed_load_before ed_pj_copy ed_pj_name ed_rv ed_send ed_shadow ed_step_put ed_step_reply ed_step_sig ed_str ed_tdesc ed_ui_save ed_ui_state ed_v ed_val excite_turn favorite_has favorite_set fm1_wdt_feed fm4_load_preset lib_scan load_begin load_end lyr_set memcmp memcpy memset menu_get menu_n menu_put menu_vname mod_dst_name mod_dst_offer mod_dst_scope motion_base_value motion_capture motion_clear motion_clear_locks motion_count motion_delete_event motion_djf_set motion_enabled motion_param motion_set_enabled motion_set_event motion_set_lock ota_wire_send palette_set proj_pack project_capture project_load project_rename project_save_as project_used set_engine settings_export settings_save song_erase_parts st_crc32 st_read str_len track_select transport_busy tsel_p ui_message up_grid up_load up_name_ok up_parse up_put up_rec up_set_value up_store up_used up_values
ed_handle 7142 text apply_preset bt_hw_seg chain_busy chain_defaults chain_prepare_at chain_valid desc_unit ed_args_ok ed_b ed_begin ed_bk_object ed_bk_r32 ed_bk_u32 ed_bk_write ed_desc ed_eng ed_flash_stop ed_fm6_handle ed_known ed_load_after ed_load_before ed_pj_copy ed_pj_name ed_rv ed_send ed_shadow ed_step_put ed_step_reply ed_step_sig ed_str ed_tdesc ed_ui_save ed_ui_state ed_v ed_val excite_turn favorite_has favorite_set fm1_wdt_feed fm4_load_preset lib_scan load_begin load_end lyr_set memcmp memcpy memset menu_get menu_n menu_put menu_vname mod_dst_name mod_dst_offer mod_dst_scope motion_base_value motion_capture motion_clear motion_clear_locks motion_count motion_delete_event motion_djf_set motion_enabled motion_param motion_set_enabled motion_set_event motion_set_lock ota_wire_send palette_set proj_pack project_capture project_load project_rename project_save_as project_used set_engine settings_export settings_save song_erase_parts st_crc32 st_read str_len str_nth track_select transport_busy tsel_p ui_message up_grid up_load up_name_ok up_parse up_put up_rec up_set_value up_store up_used up_values
ed_known 96 text
ed_lm_ok 24 text
ed_load_after 88 text ed_eng tsel_p
@@ -483,7 +483,7 @@ fm1_irq_off 4 text
fm1_irq_on 6 text
fm1_lcd_wait 48 text
fm1_led_dim_level 40 text
fm1_main 9474 text ! autosave_poll autosave_sig bg_energy boot_splash bt_get bt_hw_seg bt_prox_tick bt_set bt_start chain_defaults chain_valid cpu_clock cpu_lost cv_begin cv_blit cv_text dbg_boot dlg_on draw_confirm draw_text_box ed_service fav_rows_new favorite_set fl_far fm1__sr_bits fm1_adc_read fm1_delay_ms fm1_enter_uboot fm1_guard_enable fm1_guard_lock_top fm1_led_dim_level fm1_mc_hold fm1_wdt_feed fm6_init fvb_boot fxg_chorus fxg_delay fxg_dist fxg_master fxg_reverb graph_adsr graph_eco graph_lfo home_param home_vis irq_save jam_load lcd_init lcd_panel_apply lcd_panel_is_b lcd_power lcd_sync ly_word macro_dice master_lvl master_poll memcpy memset mx_defaults name_on og_cos og_sin ota_crc16 ota_erase ota_fread ota_jl_enc ota_memeq ota_prog ota_rd16 ota_rd32 ota_read ota_reply_identity ota_show ota_take ota_unstage ota_wr16 ota_wr32 palette_to_stored panel_init panel_setup param_format power_sound_of proj_bound proj_fetch proj_import project_restore_runtime scr_fill scr_get scr_holes scr_wake scr_wake_now seg_missing seq_counting settings_import settings_init settings_poll settings_save song_index_load song_mode_restore song_poll splash_at split_cut split_track st_load steps_sig str_cpy str_len sy_entry track_defaults track_defaults_steps uh_task ui_draw_body ui_input ui_leds ui_message up_bank_check up_used upf_empty upf_valid usb_detach usb_serial_apply usb_start vc_io vis_new vis_pick vr vx_animal vx_draw
fm1_main 9474 text ! autosave_poll autosave_sig bg_energy boot_splash bt_get bt_hw_seg bt_prox_tick bt_set bt_start chain_defaults chain_valid cpu_clock cpu_lost cv_begin cv_blit cv_text dbg_boot dlg_on draw_confirm draw_text_box ed_service fav_rows_new favorite_set fl_far fm1__sr_bits fm1_adc_read fm1_delay_ms fm1_enter_uboot fm1_guard_enable fm1_guard_lock_top fm1_led_dim_level fm1_mc_hold fm1_wdt_feed fm6_init fvb_boot fxg_chorus fxg_delay fxg_dist fxg_master fxg_reverb graph_adsr graph_eco graph_lfo home_param home_vis irq_save jam_load lcd_init lcd_panel_apply lcd_panel_is_b lcd_power lcd_sync ly_word macro_dice master_lvl master_poll memcpy memset mx_defaults name_on og_cos og_sin ota_crc16 ota_erase ota_fread ota_jl_enc ota_memeq ota_prog ota_rd16 ota_rd32 ota_read ota_reply_identity ota_show ota_take ota_unstage ota_wr16 ota_wr32 palette_to_stored panel_init panel_setup param_format power_sound_of proj_bound proj_fetch proj_import project_restore_runtime scr_fill scr_get scr_holes scr_wake scr_wake_now seg_missing seq_counting settings_import settings_init settings_poll settings_save song_index_load song_mode_restore song_poll splash_at split_cut split_track st_load steps_sig str_cpy str_len str_nth sy_entry track_defaults track_defaults_steps uh_task ui_draw_body ui_input ui_leds ui_message up_bank_check up_used upf_empty upf_valid usb_detach usb_serial_apply usb_start vc_io vis_new vis_pick vr vx_animal vx_draw
fm1_mc_hold 120 text
fm1_mc_park 96 text fm1_mc_hold
fm1_p33_read 68 text fm1__p33_xfer
@@ -549,7 +549,7 @@ focus_named 52 text track_desc tsel_p
focus_slot 46 text tsel_p
fold 26 text
font_advance 24 text
foot_crumbs 436 text black_held cur_page grid_on lz_fam lz_on menu_tab nav_group_name nav_groups nav_page_name nav_sec page_title str_cpy str_len
foot_crumbs 446 text black_held cur_page grid_on lz_fam lz_on menu_tab nav_group_name nav_groups nav_page_name nav_sec page_title str_cpy str_len str_nth
foot_h 16 text lz_on
foot_hint 374 text act_col cur_page ev_row ev_rows save_level str_cpy
foot_ph 46 text seq_src
@@ -641,17 +641,17 @@ gen_drums_m 112 text gdrum_hit gen_drums
gen_evolve 158 text
gen_fxs 210 bt clamp gfxs_own grr
gen_genre_next 44 text
gen_kit 1824 text gch gclub gkit_math glatin grr memcpy memset
gen_kit 1826 text gch gclub gkit_math glatin grr memcpy memset
gen_knob_bt 344 bt accel clamp gen_amt_turn gen_genre_next
gen_lead 4422 bt euclid gch gchord gen_riff gl_add gl_cad gl_ct gl_near gl_pal gl_write gnd gpickw gr grr gseed
gen_make 8368 text chain_defaults dhold dlen dlevel gch gclear_all gclub gdna gdrum_clear_region gdrum_hit gen_drums_m gen_evolve gen_fxs gen_kit gen_mix gen_pick gen_post gen_role gen_scale_page gen_sound gform gkick_of glane_rat glatin gls_hash gls_prep gmot gmut_take gmute gnd gnote gplan gr grow grr gseed gtile gtriad_ok gwobble gx_engine gx_genre gx_prog gx_sound load_begin load_end macro_dice memcmp memcpy memset motion_clear motion_set_event pfx_lane_put rng section_load section_store set_engine_of steps_sig system_init
gen_mix 1316 text gclub gmix_more grr
gen_make 8666 text chain_defaults dhold dlen dlevel gch gclear_all gclub gdna gdrum_clear_region gdrum_hit gen_drums_m gen_evolve gen_fxs gen_kit gen_mix gen_pick gen_post gen_role gen_scale_page gen_sound gform gkick_of glane_rat glatin gls_hash gls_prep gmot gmut_take gmute gnd gnote gplan gr grow grr gseed gsong gtile gtriad_ok gwobble gx_engine gx_genre gx_prog gx_sound load_begin load_end macro_dice memcmp memcpy memset motion_clear motion_set_event pfx_lane_put rng section_load section_store set_engine_of steps_sig system_init
gen_mix 1244 text gclub gmix_more grr
gen_new_seed 246 text rng
gen_on 20 text
gen_pads 1710 bt clamp dhold gch gchord gchord_at gchord_root_pc gci gclub gnote gr grr gseed gvo_mode
gen_page 16 text
gen_pick 1734 bt clamp gch glatin gminor gplan gprog_ok gr grr gx_prog memcpy
gen_post 1792 text comp_legacy comp_migrate dlen gch gchr gclear gin_mode gjazz gkick gr gseed gx_comps step_set_ratchet
gen_post 1428 text comp_legacy comp_migrate dlen gch gchr gin_mode gjazz gkick gr gseed gx_comps step_set_ratchet
gen_press 702 text bt_hw_seg chain_busy chain_play_ui gcpu_fit gen_make gen_new_seed gen_sig gls_begin gst_put proj_pack project_capture seg_missing seq_counting seq_stop song_draft_begin song_poll str_cpy str_len ui_message ui_say
gen_radio 312 text beat_samples cv_frame cv_rect cv_text fmt_int heat_col str_cpy
gen_riff 486 text dstep_tie gba_vary gnd gnote gr gz_get memcpy
@@ -669,7 +669,7 @@ gfxs_own 96 text grr
gidm_edit 940 text gch gdrum_clear_region gdrum_hit glane_rat glm gr grr memcpy motion_set_lock step_lmode step_set_chance
gin_mode 52 text
giv 26 text gtone
gjazz 160 text gdrum_hit glm gr
gjazz 160 bt gdrum_hit glm gr
gkick 24 text
gkick_of 66 text
gkit_math 134 bt gch grr
@@ -757,6 +757,7 @@ grid_own 94 text drum_note_lane step_to_grid
grow 340 text memcpy memset
grr 32 text gr
gseed 170 text gr seed_fuse
gsong 848 text gch gr
gsplit 186 bt gcolour gq_fix gtriad_ok memcpy
gst_put 82 text memcpy proj_import sound_put
gtile 68 text dlen memcpy
@@ -835,7 +836,7 @@ kc_w 22 text
kern 78 text glyph_at
key_black 28 text
key_next 336 text drum_oct_note dxo_on midi_local_held mo_key mo_kon
key_off 278 text drum_oct_note dxo_off input_off midi_local_held mo_koff rec_release trk_note_off
key_off 278 text * drum_oct_note dxo_off input_off midi_local_held mo_koff rec_release trk_note_off
key_place 46 text key_black
keys_mode 32 text ckeys_on grid_on name_on skeys_on
keys_pg 56 text cur_page
@@ -944,7 +945,7 @@ lyr_set 292 text sy_entry sy_tok
lyric_pick 342 text str_cpy sy_norm_lang sy_tok sy_word tsel_p
lz_comp_mark 100 text comp_col cv_rect
lz_fam 84 text fx_on gen_on pd_cur pd_on save_on
lz_hint 120 text cur_page home_vis str_eq
lz_hint 126 text cur_page home_vis str_eq str_nth
lz_mini_being 38 text cv_rrect
lz_note 58 text note_col
lz_on 118 text dlg_on fx_on gen_on lens_on name_on pd_on save_on
@@ -973,7 +974,7 @@ menu_get 438 text menu_flag vel_row
menu_large 20 text
menu_lines 148 text about_byte bt_hw_seg menu_text str_len
menu_n 100 text vel_row
menu_panel 1036 text cv_clip_text cv_rect cv_text cv_text_in cv_text_on cv_text_r fmt_int lz_tile menu_get menu_large menu_n menu_set menu_tab menu_val menu_vname mtab_first mtab_rows str_cpy str_len
menu_panel 1044 text cv_clip_text cv_rect cv_text cv_text_in cv_text_on cv_text_r fmt_int lz_tile menu_get menu_large menu_n menu_set menu_tab menu_val menu_vname mtab_first mtab_rows str_cpy str_len str_nth
menu_put 802 text bt_hw_enable bt_set lcd_panel_apply lcd_panel_is_b menu_flag menu_get palette_set seg_missing vel_row
menu_scroll_max 22 text menu_document
menu_set 26 text menu_tab mtab_first
@@ -1191,7 +1192,7 @@ panel_btn_of 28 text
panel_enc 44 text fm1_enc_take
panel_init 174 text memcpy
panel_send 94 text
panel_setup 538 text cv_begin cv_blit cv_text draw_text_box fm1_delay_ms fm1_enc_take fm1_input_edges fm1_wdt_feed memcpy scr_fill setup_show text_w ui_message
panel_setup 550 text cv_begin cv_blit cv_text draw_text_box fm1_delay_ms fm1_enc_take fm1_input_edges fm1_wdt_feed memcpy scr_fill setup_show str_nth text_w ui_message
panic_block 316 text midi_out_event_at midi_silence_track mo_flush_of mo_koff pfx_hush
param_desc_of 36 text
param_fit 42 text
@@ -1247,7 +1248,7 @@ pitch_inc 36 text
pk_amt 6 text
pk_fill 128 text ux_mix
pk_load 162 text memcpy memset pk_row
pk_name 146 text str_cpy
pk_name 150 text str_cpy str_nth
pk_per 46 text
pk_press 150 text *
pk_row 46 text
@@ -1393,10 +1394,10 @@ sc_track 374 text input_on midi_local_held mo_kon rec_note rec_on scn_notes
scale_mask 32 text
scale_snap 52 text scale_mask
scale_steps 112 text scale_mask scale_snap
scene_drum_tick 272 text div_samples trk_note_off trk_note_on
scene_drum_tick 272 text * div_samples trk_note_off trk_note_on
scene_follow 156 text sc_track scene_follow_off
scene_follow_off 82 text input_off mo_koff
scene_key 322 text input_off kb_map midi_local_held mo_koff sc_track
scene_follow_off 82 text * input_off mo_koff
scene_key 322 text * input_off kb_map midi_local_held mo_koff sc_track
scn_notes 280 text chord_build_mode
scope_at 238 text cv_rect scope_lod scope_seg
scope_lod 110 text scope_seg
@@ -1560,6 +1561,7 @@ str_gain 62 text str_exp2n
str_hash 20 text
str_len 14 text
str_line 60 text
str_nth 12 text
str_period 66 text
string_amp 26 text *
string_block 20 text *
@@ -1583,7 +1585,7 @@ sw_ui_knob_bt 136 bt accel clamp sw_sv sw_sv_put tsel_p
sy_enter 248 text ph_fric sy_ms
sy_entry 112 text sy_norm sy_word
sy_es_tok 470 text sy_isv
sy_gen_word 1208 text ly_meta ly_pick ly_word str_cpy sy_phrase_len sy_rnd
sy_gen_word 1220 text ly_meta ly_pick ly_word str_cpy str_nth sy_phrase_len sy_rnd
sy_isv 34 text
sy_ms 14 text
sy_norm 76 text
@@ -1669,7 +1671,7 @@ uac_stream 50 text memset
uac_tap 172 text
uac_tap48 226 text uac_collect uac_rs_run
uac_tap8 436 text
uh_connect 116 bt sie_rd sie_wr uh_probe uh_start_ep uh_wait
uh_connect 128 bt sie_rd sie_wr uh_probe uh_start_ep uh_wait
uh_csr0 88 bt fm1_wdt_feed sie_rd sie_wr
uh_ctl 272 bt sie_rd sie_wr uh_csr0
uh_ctl_out 170 bt sie_wr uh_csr0
@@ -1677,7 +1679,7 @@ uh_host_up 168 bt sie_wr uh_wait
uh_hub_port_probe 230 bt uh_ctl uh_probe uh_wait
uh_hub_probe 282 bt uh_ctl uh_hub_port_probe uh_hub_status uh_wait
uh_hub_status 100 text uh_ctl
uh_parse_midi 358 text
uh_parse_midi 394 text
uh_parse_uac 642 text
uh_probe 536 bt uh_ctl uh_ctl_out uh_hub_probe uh_parse_midi uh_parse_uac uh_wait
uh_session_end 30 bt
@@ -1685,7 +1687,7 @@ uh_start_ep 178 bt sie_wr
uh_task 418 bt uh_connect uh_host_up uh_hub_port_probe uh_hub_status uh_session_end uh_start_ep uh_wait
uh_wait 40 bt fm1_wdt_feed
ui_draw_body 1390 text as_mix bt_hw_seg cursor_fix cv_begin cv_blit cv_key_hint cv_keycap cv_text dlg_on dlg_tabs draw_columns draw_confirm draw_countin draw_foot draw_frame draw_graph draw_head draw_layer draw_menu draw_tabs draw_text_box fill_around fmt_int gen_cards_bt kh_ink lcd_sync lz_on name_on nm_card nm_draw_panel nm_len_max nv_page page_entered page_first page_flash_draw page_visible scr_fill seg_screen str_cpy str_len transport_busy
ui_input 546 text beat_samples chain_busy eu_mutate gen_tick str_cpy str_len track_desc tsel_p ui_input_frame ui_preview_ok ui_say
ui_input 556 text beat_samples chain_busy eu_mutate gen_tick str_cpy str_len str_nth track_desc tsel_p ui_input_frame ui_preview_ok ui_say
ui_input_frame 15560 text accel act_col act_cols act_do act_ready apply_preset apply_preset_to black_held bn_set bt_cal_tick bt_hw_seg bt_prox_input bt_prox_ok btn_hold btn_used chain_busy chain_defaults chain_play_ui chord_peek ckeys_on clip_launch comp_any comp_legacy comp_migrate confirm_open cp_copy cp_held cp_say cur_page cursor_fix cursor_set dlg_on drum_elsewhere edit_param enc_drop eng_gone ent_commit ent_message eu_anchor eu_gen eu_mutate eu_of ev_len excite_turn fm1_input_edges fm4_apply fm6_bank_slot fm6_load_slot fm6_neutral fm6_pack fm6_set_patch fm6_slot_ok fm6_unpack fmt_int fx_macro_back gen_knob_bt gen_on gen_page gen_press go_home grid_acc grid_hit grid_on home_life home_macros home_param home_vis init_sound_of jam_end jam_load kb_map key_black key_place keys_mode knob_cap kx_frame layer_allowed layer_held layer_key layer_let_go layer_open layer_opened layer_set_open layer_tap live_rec_sel load_begin load_end lock_held lock_id ly_avail ly_bit ly_down ly_page lyr_set macro_dice memcpy memset menu_close menu_put menu_scroll_max menu_set menu_step menu_tab ml_poll mom_knob mom_poll motion_base_value motion_capture motion_clear motion_desc motion_lock_get motion_set_lock motion_thin_id mtab_first mtab_rows name_close name_on name_open nav_button nav_go nav_key nav_mem nav_put nav_sec nav_select nm_black nm_commit nm_do nm_group nm_insert oct_key open_family page_desc page_first page_go page_tap panel_btn_of panel_enc panel_setup param_turn part_dice pk_load pk_per pk_shape pke_knob_bt pke_oct pke_sel_bt preset_all_at_in preset_all_pos preset_at preset_go preset_pos preset_step project_recall_slot project_recall_sound project_rename project_save_as rec_clear_auto rec_first rec_set rec_tap rng row_copy rp_apply rp_get sc_beat sc_dice scr_wake sec_of_fam section_ask section_jump section_keep sel_set seq_counting seq_is_empty seq_sel set_engine set_engine_of skeys_on song_draft_begin song_erase_parts song_idx_touch song_save_as song_select step_accents_of step_lanes_of str_cpy str_len sy_gen_word system_init take_busy tl_keys tools_key track_defaults_steps track_desc track_select transport_busy trk_base4 trk_engp tsel_p ui_message ui_say undo_mark undo_sound up_load up_ui up_ui_named usb_serial_apply vis_new
ui_leds 3906 text ! act_cols act_ready beat_samples black_held bt_prox_ok chain_busy click_beat_len cur_page dx_lane_muted edit_recallable fm1_led_dim_level glo_sounding grid_on kb_map key_black key_place layer_btn layer_set_open led_put menu_get menu_step midi_note_held name_on nm_black perf_avail perf_key project_used rec_clearable rp_get scale_mask seq_counting seq_src step_accents_of step_lanes_of tsel_p
ui_message 10 text