mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-05 12:24:42 +01:00
V10.8.62: MATH WAVE SYNC, the formula's rhythm locked to the tempo (every key the same pattern, transposed); preset BYTE SYNC
(a user: "I love the MATH BYTEBEAT's sound and the kinda arp on it, but the bpm is not the same from a note to another"; the owner: "SYNC, ¿no es más claro?") - eng_lofi.c: WAVE SYNC (stored 7, after BYTE 5 and FLOAT 6): BYTE with its slow bits (te's bits 8 and up: the rhythm, the arp's steps) from the song's clock (lofi_sync, as MOTION's own SYNC, scaled x0.336 so at 120 BPM the rhythm is C4's today with MOTION 0, its slow time's rounding included), its fast bits (the pitch) the note's: every key the same pattern in time, only transposed; MOTION 0..127 its speed as before; stopped, the bar free at the BPM. The slow time not advanced by the note between held samples (one time base). As JIANT BYTE's TIME SYNC (FM has no P_KEY: a new parameter would move the editor's ids; FIJO not ported). - A new preset BYTE SYNC (BYTEBEAT with it), appended, browsed after BYTEBEAT; MATH's 18 PROGRAM CHANGE numbers, GEN's picks (gen.c: the appended one left out of n) and the factory presets as they were (their V23 renders kept). - WAVE kept a list everywhere it was one: no matrix destination (mod.c, as when it had two values: GEN's routings and its songs unchanged), the sound dice BYTE or FLOAT (ui_input.c). ui_engvis.c: SYNC drawn as BYTE. - tests: math_timelock_test (two notes an octave apart at 120 BPM: the same slow time block by block and as many rhythm steps, two pitches; BYTE: the octave twice as fast), in voice-user-check.yml; golden.txt + preset/MATH/12_BYTE_SYNC only (every other render as before); ui_test's PROGRAM CHANGE check (BYTE SYNC browser-only); docs/ web/ NRPN.md. - The lines model as V10.8.61's (101 59/31 %, 102 41/29, 103 78/14, 104 54/31, 105 66/40, 0c 70/58). audio.c as V23's. Layout recorded again (FELUCCA_REPIN=keep); the plain build passes. Image 580340 of 584336 (3996 B free), RAM code 40180 (unchanged: MATH in the flash). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
14 files changed
+1439
-1354
No files matched your search
@@ -205,6 +205,8 @@ jobs:
|
||||
build/song-check/euclid-mel | tee build/song-check/euclid-mel.log
|
||||
cc -O1 -w -Wno-implicit-function-declaration -Ibuild/gen -Ifirmware/src tests/math_morph_test.c -lm -o build/song-check/math-morph
|
||||
build/song-check/math-morph | tee build/song-check/math-morph.log
|
||||
cc -O1 -w -Wno-implicit-function-declaration -Ibuild/gen -Ifirmware/src tests/math_timelock_test.c -lm -o build/song-check/math-timelock # (V10.8.62) MATH WAVE SYNC
|
||||
build/song-check/math-timelock | tee build/song-check/math-timelock.log
|
||||
cc -O1 -w -Wno-implicit-function-declaration -Ibuild/gen -Ifirmware/src tests/dx_math_test.c -lm -o build/song-check/dx-math
|
||||
build/song-check/dx-math | tee build/song-check/dx-math.log
|
||||
cc -O1 -w -Wno-implicit-function-declaration -Ibuild/gen -Ifirmware/src -Itests tests/jam_test.c -lm -o build/song-check/jam
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ Each engine's EDIT values as its preset 1 shows them (a mode may rename one: DES
|
||||
| PHASE 2 | 121 | SUB | 0..127 | 0 | |
|
||||
| PHASE 2 | 122 | FEEDBK | 0..127 | 0 | |
|
||||
| MATH 3 | 115 | CHIP | 0..3 | 2 | 4BIT 4B/2 8BIT 1BIT |
|
||||
| MATH 3 | 116 | WAVE | 5..6 | 5 | BYTE FLOAT |
|
||||
| MATH 3 | 116 | WAVE | 5..7 | 5 | BYTE FLOAT SYNC |
|
||||
| MATH 3 | 117 | ALGO | 0..191 | 64 | |
|
||||
| MATH 3 | 118 | VARIANT | 0..127 | 0 | |
|
||||
| MATH 3 | 119 | MOTION | 0..255 | 0 | |
|
||||
|
||||
+22
-6
@@ -6,9 +6,10 @@
|
||||
* project, a user preset -- plays as ANALOG's nearest (core.h analog_from_chip). The engine's number (3) and its stored
|
||||
* values stay: WAVE 5 BYTE, 6 FLOAT; CHIP 0..3 the bits (STEP, 4, read as 4BIT: the same sound on BYTE and FLOAT) */
|
||||
static const char *const N_CHIP[] = {"4BIT", "4B/2", "8BIT", "1BIT"};
|
||||
static const char *const N_RWAVE[] = {"-", "-", "-", "-", "-", "BYTE", "FLOAT"}; /* (WAVE 5, 6: the stored numbers) */
|
||||
static const char *const N_RWAVE[] = {"-", "-", "-", "-", "-", "BYTE", "FLOAT", "SYNC"}; /* (WAVE 5, 6: the stored numbers;
|
||||
* V10.8.62 7: SYNC, BYTE with its time locked) */
|
||||
enum { CHIP_4BIT, CHIP_4B2, CHIP_8BIT, CHIP_1BIT };
|
||||
enum { RW_BYTE = 5, RW_FLOAT = 6 };
|
||||
enum { RW_BYTE = 5, RW_FLOAT = 6, RW_BLOCK = 7 }; /* (V10.8.62) SYNC: BYTE, its rhythm locked to the tempo */
|
||||
|
||||
/* (JIANT 0.4) WAVE = BYTE: bytebeat, an 8-bit formula of the time t played as the wave (after viznut's 2011
|
||||
* one-liners: the music is in the formula). DUTY picks one of 32 (ALGO, DUTY / 4), CRSH is the formulas' variable
|
||||
@@ -260,7 +261,17 @@ static __attribute__((noinline)) void lofi_byte_render(track_t *t, voice_t *v, i
|
||||
uint32_t lm = p[P_E7] ? (1u << (17u - (uint32_t)p[P_E7] * 12u / 127u)) - 1u : 0xFFFFFFFFu; /* LOOP: t's window */
|
||||
uint32_t t0 = (uint32_t)(f < 32u ? BYTE_T0[f] : 0u) << 9; /* (0.5.1: the formula's start) */
|
||||
uint32_t mul = lofi_motion(p[P_E4]), ts = v->ph[1], var = vr; /* (0.5.4) MOTN: the slow time, Q8 */
|
||||
uint32_t sy = p[P_E4] >= 128, sr = 0, sb = sy ? lofi_sync(&sr) : 0u; /* (p6) SYNC */
|
||||
uint32_t lk = p[P_E1] == RW_BLOCK, sy = p[P_E4] >= 128 || lk, sr = 0, sb = sy ? lofi_sync(&sr) : 0u; /* (p6) SYNC;
|
||||
* (V10.8.62, a user: "the bpm is not the same from a note to
|
||||
* another") WAVE SYNC: the time locked, the slow bits (the rhythm) from
|
||||
* the tempo (at 120 BPM as C4's own), the fast
|
||||
* ones (the pitch) the note's: every key the same pattern, in
|
||||
* time, transposed; stopped, the bar free at the BPM */
|
||||
if (lk) {
|
||||
mul = lofi_motion(p[P_E4] & 127);
|
||||
sb = (sb >> 7) * 43u + ((sb & 127u) * 43u >> 7); /* (x 0.336: at 120 BPM the rhythm as C4's today with */
|
||||
sr = sr * 43u >> 7; /* MOTION 0, its slow time's own rounding included) */
|
||||
}
|
||||
hold *= 1 + (p[P_E5] >> 3); /* (0.5.4) GRIT: each sample held up to 16 x longer */
|
||||
uint32_t vsh = VH_SH(); /* (V10.7.56) at half the rate: the hold half as many samples, */
|
||||
int32_t sk = vsh ? 3 : 2; /* the two smoothing poles squared (1/2 -> 3/4 a sample), SYNC's */
|
||||
@@ -283,7 +294,8 @@ static __attribute__((noinline)) void lofi_byte_render(track_t *t, voice_t *v, i
|
||||
tf += ti;
|
||||
tt += tf >> 24;
|
||||
tf &= 0xFFFFFFu;
|
||||
ts += ((ti >> 8) * mul) >> 16;
|
||||
if (!lk)
|
||||
ts += ((ti >> 8) * mul) >> 16;
|
||||
l1 += (((held >> 1) - l1) * sk) >> 2; /* (JIANT 0.5) the 8-bit steps rounded: two one-poles before
|
||||
* the filter (BYTE was knife-sharp); 0.9.11: at ~4.9 kHz, were
|
||||
* ~6.3 (x 0.6): their images softer, the steps' edges filed */
|
||||
@@ -442,10 +454,14 @@ static const preset_t LOFI_PRESETS[] = {
|
||||
MODS(P_FCUT, 100, P_LWAVE, LW_SH, P_LRATE, -10, P_LD_FLT, 16, MMOD(1, PS_RAND, PD_PAN, 40))},
|
||||
{"FLOAT PAD", {2, 6, 112, 0, 0, 0, 0, 0}, {80, 90, 69, 100}, 0, 1 | TAG(PAD), FX(30, 20, 30, 55), PAT(3), BREATHE(14, 0, 0),
|
||||
MODS(P_FCUT, 90)},
|
||||
/* (V10.8.62, appended; a user: "I love BYTEBEAT's sound and its kinda arp, but the bpm is not the same from a note to
|
||||
* another") BYTEBEAT with WAVE SYNC: its rhythm the tempo's, every key the same arp transposed */
|
||||
{"BYTE SYNC", {2, 7, 4, 0, 0, 0, 0, 0}, {0, 80, 110, 40}, 0, 1 | TAG(FX), FX(0, 0, 25, 20), PAT(4),
|
||||
MODS(MMOD(1, PS_MODW, PD_E(3), 40), MMOD(2, PS_AT, PD_E(6), 40))},
|
||||
};
|
||||
/* (V10.6i) browsed: the voices to play, the experiments, INIT (ui.c: in LOFI_ORDER's place; LOFI_PC stays) */
|
||||
static const uint8_t MATH_ORDER[] = {3, 4, 5, 6, 7, 11, /* to play */
|
||||
0, 1, 2, 8, 10, /* experiments */
|
||||
0, 12, 1, 2, 8, 10, /* experiments (V10.8.62: BYTE SYNC by BYTEBEAT) */
|
||||
9}; /* INIT */
|
||||
_Static_assert(sizeof MATH_ORDER == NELEM(LOFI_PRESETS), "MATH's browsing order: every preset once");
|
||||
|
||||
@@ -454,7 +470,7 @@ static const engine_t ENG_LOFI = {
|
||||
.page_title = {"FORMULA", "MOTION"},
|
||||
.edit = {
|
||||
{"CHIP", F_ENUM, 0, 3, 2, N_CHIP}, /* (FLOAT: 8BIT reads FULL, lofi_desc) */
|
||||
{"WAVE", F_ENUM, RW_BYTE, RW_FLOAT, RW_BYTE, N_RWAVE},
|
||||
{"WAVE", F_ENUM, RW_BYTE, RW_BLOCK, RW_BYTE, N_RWAVE}, /* (V10.8.62: SYNC, the time locked) */
|
||||
{"ALGO", F_INT, 0, 127, 64, 0}, /* (the knob 0..191 and the names: lofi_desc) */
|
||||
{"VARIANT", F_PCT, 0, 127, 0, 0},
|
||||
{"MOTION", F_INT, 0, 127, 0, 0}, /* (V10.6d: 0 the default; the knob to 255 SYNC: lofi_desc) */
|
||||
|
||||
@@ -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.61" /* (2026-11-27) 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 (tracking boxes joined, live numbers); KNOB 1 DENSITY, 3 PALETTE MIXED THERMAL ORG/BLUE GRN/RED AMBER MONO; the saver another every 30 s; V10.8.56 (the owner: "visuales random en HOME", both): HOME > VISUAL, BEING's second page (ROUTES' place), a figure from a seed of the creatures' pieces (OCT+ a new one, "VISUAL #n"; KNOB 1 COMPLEX, 2 WOBBLE, 3 PALETTE, 4 REACT), moving with the sound; MENU > DISPLAY > SAVER (OFF 1 3 5 10 MIN, 3 the default): the figure the whole screen after that long with no panel input, the first touch only brings the page back; V10.8.55 (the owner: "the snail and the caterpillar can be better: a misreading of the original, not the engine"; "a bit more deformity in the circles, cheap, a modifier of the animations' engine"; "DRUM-X too"): the creatures' circles wobble (vx_wf: two lobes turning, more with the sound); their colours as their originals' (ANALOG's isotherms, DRIVE's spikes and NOISE's cilia; WHEEL's tubes warmed by DRIVE; STRING's silk by BRIGHT; MATH BYTE's segments lit by the byte its voice holds); in silence an idle wave (the snail's sole, the caterpillar's colours on HOME > BEING); DRUM-X's kit a table of beings (one call); PHASE's snail and MATH's caterpillar drawn through vx_gx as their originals were (head and eyestalks at the left, the shell on its back, the wave its sole; the caterpillar crawling in a wave, segments thinning to the tail, its skins the sound, the head at the right); V10.8.54 (the owner: "pasá todas esas", Studio's projects, RESOUND): ANALOG WHEEL PHASE MATH STRING's creatures through one routine (vx_gx; WHEEL's worms waving with their crowns, ANALOG's spikes cilia and oscillators); editor PROJ_LIST 95 / PROJ_NAME 96 / PROJ_OP 97 (Studio's library: rename a part or a project live, copy move delete a project); GLO + A4 RESOUND (new sounds for the whole song, its notes kept; GLO + G4 back); RESTART, a DRUM sound's mute, LANE, REC GRID, PROJECT n, MIXER's KNOB 4 and "A > B NEXT BAR" said; a lens page's OCT+ gestures in its footer (1.5 s, and while OCT+ is held); V10.8.53 (the owner: "every picture from the same engine, so their room shrinks"): the pictures' shared engine (ui_gx.c: cells, a sine, chips, keys); DELAY REVERB CHORUS SENDS drawn with it, DIST's and CLIP's curve one; the big numbers in M (the V face gone), the count-in on one line, the EQ's curve, the TOOLS picture and the small beings of the lists gone; SEQ EDIT (SEQ held): KNOB 1 / 2 the selection, 3 the ACTION (STRETCH .. MUTATE, GENERATE in the selection with KNOB 4 its genre and a new seed, RANDOM on its grid 1/4 .. 1/32), 4 its amount, OCT+ does it, F#5 UNDO / REDO; GLO's mutes, UNMUTE ALL, SCL's ROOT and REC's QUANTIZE say what they did; V10.8.52 (the owner: "don't lose songs"): SAVE + C4..F4 / OCT+ over a part with music asks OVERWRITE A? (OCT+ yes, once a part until another project opensLine truncated
|
||||
#define FELUCCA_VERSION "V10.8.62" /* (2026-11-27) 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 (tracking boxes joined, live numbers); KNOB 1 DENSITY, 3 PALETTE MIXED THERMAL ORG/BLUE GRN/RED AMBER MONO; the saver another every 30 s; V10.8.56 (the owner: "visuales random en HOME", both): HOME > VISUAL, BEING's second page (ROUTES' place), a figure from a seed of the creatures' pieces (OCT+ a new one, "VISUAL #n"; KNOB 1 COMPLEX, 2 WOBBLE, 3 PALETTE, 4 REACT), moving with the sound; MENU > DISPLAY > SAVER (OFF 1 3 5 10 MIN, 3 the default): the figure the whole screen after that long with no panel input, the first touch only brings the page back; V10.8.55 (the owner: "the snail and the caterpillar can be better: a misreading of the original, not the engine"; "a bit more deformity in the circles, cheap, a modifier of the animations' engine"; "DRUM-X too"): the creatures' circles wobble (vx_wf: two lobes turning, more with the sound); their colours as their originals' (ANALOG's isotherms, DRIVE's spikes and NOISE's cilia; WHEEL's tubes warmed by DRIVE; STRING's silk by BRIGHT; MATH BYTE's segments lit by the byte its voice holds); in silence an idle wave (the snail's sole, the caterpillar's colours on HOME > BEING); DRUM-X's kit a table of beings (one call); PHASE's snail and MATH's caterpillar drawn through vx_gx as their originals were (head and eyestalks at the left, the shell on its back, the wave its sole; the caterpillar crawling in a wave, segments thinning to the tail, its skins the sound, the head at the right); V10.8.54 (the owner: "pasá todas esas", Studio's projects, RESOUND): ANALOG WHEEL PHASE MATH STRING's creatures through one routine (vx_gx; WHEEL's worms waving with their crowns, ANALOG's spikes cilia and oscillators); editor PROJ_LIST 95 / PROJ_NAME 96 / PROJ_OP 97 (Studio's library: rename a part or a project live, copy move delete a project); GLO + A4 RESOUND (new sounds for the whole song, its notes kept; GLO + G4 back); RESTART, a DRUM sound's mute, LANE, REC GRID, PROJECT n, MIXER's KNOB 4 and "A > B NEXT BAR" said; a lens page's OCT+ gestures in its footer (1.5 s, and while OCT+ is held); V10.8.53 (the owner: "every picture from the same engine, so their room shrinks"): the pictures' shared engine (ui_gx.c: cells, a sine, chips, keys); DELAY REVERB CHORUS SENDS drawn with it, DIST's and CLIP's curve one; the big numbers in M (the V face gone), the count-in on one line, the EQ's curve, the TOOLS picture and the small beings of the lists gone; SEQ EDIT (SEQ held): KNOB 1 / 2 the selection, 3 the ACTION (STRETCH .. MUTATE, GELine truncated
|
||||
#endif
|
||||
#if FELUCCA_OTA && !FELUCCA_FLASH
|
||||
#error "FELUCCA_OTA needs FELUCCA_FLASH"
|
||||
|
||||
+1
-1
@@ -1692,7 +1692,7 @@ static __attribute__((noinline)) void gen_sound(track_t *t, uint32_t role, uint3
|
||||
gs.fm6 += e == ENGI_FM6;
|
||||
set_engine_of(t, e);
|
||||
en = trk_engp(t);
|
||||
n = en->npresets;
|
||||
n = en->npresets - (en == &ENG_LOFI); /* (V10.8.62: MATH's appended BYTE SYNC not GEN's: its picks as before) */
|
||||
if (!n) return;
|
||||
if (pre != 255u && !sub && gch(35) && !(role == RL_BASS && gs.g->lead == LD_EBM) && ri != SR_COWBELL) /* (V10.6z10) a third of
|
||||
* the time another of the engine's presets of the same type (EBM's
|
||||
|
||||
@@ -733,6 +733,7 @@ BTAPP_FN static int mod_dst_ok(const track_t *t, uint32_t d)
|
||||
const param_desc_t *pd = track_desc(t, P_E0 + (k = d - MD_E1));
|
||||
if (!pd->label || !pd->label[0] || pd->label[0] == '-' || pd->max - pd->min <= 1) return 0;
|
||||
if (e == ENGI_FM6 && (k == 7u || k == 3u || k == 5u)) return 0; /* SLOT requires a bank load, not a parameter offset. */
|
||||
if (e == ENGI_LOFI && k == 1u) return 0; /* (V10.8.62) MATH's WAVE (BYTE FLOAT SYNC): a list, as when it was two */
|
||||
if (e == ENGI_STRING && k == 3u && t->p[P_E0] != SX_FDBK) return 0; /* POS is excitation-only. */
|
||||
if (e == ENGI_INPUT && (k == 3u || (k == 5u && !t->p[P_E3]) || (k == 4u && (t->p[P_E0] != AIN_ST || t->p[P_E3])))) return 0;
|
||||
}
|
||||
|
||||
@@ -1684,7 +1684,7 @@ static VX_SEG void vx_phase(const track_t *t, const int32_t *A, int32_t en_home)
|
||||
static VX_SEG void vx_lofi(const track_t *t, const int32_t *A, int32_t en_home)
|
||||
{
|
||||
const int16_t *p = t->p;
|
||||
int32_t a0 = A[2] * 256 / 124, b0 = (A[3] - 4) * 256 / 94, fl = p[P_E1] != RW_BYTE, new_fr = vxs.fr[8] != anim_fr;
|
||||
int32_t a0 = A[2] * 256 / 124, b0 = (A[3] - 4) * 256 / 94, fl = p[P_E1] == RW_FLOAT, new_fr = vxs.fr[8] != anim_fr;
|
||||
int32_t en = vx_level(t, 8, en_home), i, j, pk = 6000, sx[9], sy[9], bc[8], px = 0, py = 0, qx = 0, qy = 0, q[2 * 22], g = fl ? 38 : 27;
|
||||
uint32_t mt = vxs.mt[8], age = vx_age(t, 8, 0), w0 = scope_w - 256u, byte = 0, cr;
|
||||
int32_t sq = vx_sq(vx_fall(age, 154u), age);
|
||||
@@ -2078,7 +2078,7 @@ static __attribute__((noinline)) void vx_gchain(const track_t *t, const vxf_t *f
|
||||
int32_t sx[9], sy[9], bt[8], tx = 0, ty = 0, bx = 0, by = 0;
|
||||
uint32_t cr = mt * (uint32_t)(307 + 4 * en) >> 8, by8 = (uint32_t)(vx_gw(127) / 32 + 128) & 255u, na = 0;
|
||||
for (i = 0; i < NVOICE; i++) /* (BYTE: the byte its newest voice holds, as its own) */
|
||||
if (p[P_E1] == RW_BYTE && t->v[i].active && t->v[i].age >= na) { na = t->v[i].age; by8 = (uint32_t)((t->v[i].s[0] + 32640) >> 8) & 255u; }
|
||||
if (p[P_E1] != RW_FLOAT && t->v[i].active && t->v[i].age >= na) { na = t->v[i].age; by8 = (uint32_t)((t->v[i].s[0] + 32640) >> 8) & 255u; }
|
||||
for (i = 0; i < 8u; i++) bt[i] = (by8 >> i & 1u) ? en : 0;
|
||||
for (i = 0; i <= 8u; i++) {
|
||||
int32_t amp = (26 + (en * 54 >> 8)) * (77 + (int32_t)i * 179 / 8) / 256;
|
||||
@@ -2115,7 +2115,7 @@ static __attribute__((noinline)) void vx_gchain(const track_t *t, const vxf_t *f
|
||||
vx_curve(&f, q, 3, 0, 60);
|
||||
for (i = 8; i >= 1; i--) { /* the segments */
|
||||
int32_t rr = VR(i), v = vx_gw((int32_t)i * 15), m;
|
||||
v = p[P_E1] == RW_BYTE ? bt[8 - i] : clamp((v < 0 ? -v : v) * 115 / 100, 0, 4096) * 218 / 4096 + 13;
|
||||
v = p[P_E1] != RW_FLOAT ? bt[8 - i] : clamp((v < 0 ? -v : v) * 115 / 100, 0, 4096) * 218 / 4096 + 13;
|
||||
for (m = 0; m < 18; m++) {
|
||||
uint32_t a = (uint32_t)m * 65536u / 18u;
|
||||
int32_t w = (4096 + vx_gw((int32_t)i * 29 + m * 9) * 9 / 100) * vx_wf(a + i * 7000u) >> 12;
|
||||
|
||||
@@ -2213,7 +2213,8 @@ static void sound_dice_of(track_t *t, int quiet)
|
||||
if (!d->label || d->label[0] == '-' || d->max <= d->min)
|
||||
continue;
|
||||
if (d->fmt == F_ENUM)
|
||||
t->p[P_E0 + i] = (int16_t)(rng() % 3u ? t->p[P_E0 + i] : d->min + (int32_t)(rng() % (uint32_t)(d->max - d->min + 1)));
|
||||
t->p[P_E0 + i] = (int16_t)(rng() % 3u ? t->p[P_E0 + i] : d->min + (int32_t)(rng() % (uint32_t)(d->max - d->min + 1 -
|
||||
(d == &ENG_LOFI.edit[1])))); /* (V10.8.62: MATH's WAVE SYNC not diced: BYTE or FLOAT as before) */
|
||||
else if (d->fmt == F_SEMI) /* (V10.38) an interval: 0, 4th, 5th, octave, up or down */
|
||||
t->p[P_E0 + i] = (int16_t)semi_pick(rng(), d->min, d->max);
|
||||
else
|
||||
|
||||
@@ -54,6 +54,7 @@ preset/MATH/08_BYTE_TONE fa3fb32cb6350474
|
||||
preset/MATH/09_INIT_FLOAT 2df7a4914a196a5c
|
||||
preset/MATH/10_FLOAT_ARP 4e4e59e64474dffa
|
||||
preset/MATH/11_FLOAT_PAD 5c1bd117b1c612cf
|
||||
preset/MATH/12_BYTE_SYNC 9bda505989e77de0
|
||||
preset/VOICE/00_CHOIR_AAH 312576569613544f
|
||||
preset/VOICE/01_VOX_LEAD 0d28bf8ab88cdecc
|
||||
preset/VOICE/02_WOW_BASS 86438342c8e1db90
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Copyright (C) 2026 Juan Ignacio Antonucci (Juan Jiant). All rights reserved.
|
||||
/* (V10.8.62, a user: "I love the MATH BYTEBEAT's sound and its kinda arp, but the bpm is not the same from a note to
|
||||
* another") MATH's WAVE SYNC (the time locked): BYTE's slow bits (its rhythm, the arp's steps) from the tempo, the fast
|
||||
* ones (the pitch) the note's. Two notes an octave apart at 120 BPM: the same rhythm (the slow time and the windows the
|
||||
* pattern steps in, block by block), different pitches; WAVE BYTE as before: the rhythm the note's (an octave up, twice
|
||||
* as fast). Built and run by CI (voice-user-check.yml) */
|
||||
#define UI_TEST_NO_MAIN 1
|
||||
#include "ui_test.c"
|
||||
|
||||
#define TL_BLOCKS 6000u /* (~8.7 s: ~17 beats at 120) */
|
||||
/* BYTEBEAT's formula (ALGO 4: B01), WAVE w, at note n for TL_BLOCKS blocks, the bar's clock run by the test at 120 BPM:
|
||||
* each block's slow time (v.ph[1]) into ts[], the steps of the rhythm (the slow bits' changes) counted; the output's hash */
|
||||
static uint32_t take(int16_t w, uint32_t n, uint32_t *ts, uint32_t *steps)
|
||||
{
|
||||
static track_t t;
|
||||
static voice_t v;
|
||||
static int32_t o[CTL];
|
||||
vmod_t m;
|
||||
tsvf_t flt;
|
||||
uint32_t k, i, h = 2166136261u, last = 0xFFFFFFFFu;
|
||||
memset(&t, 0, sizeof t); memset(&v, 0, sizeof v); memset(&m, 0, sizeof m);
|
||||
t.p[P_E0] = 2; t.p[P_E1] = w; t.p[P_E2] = 4; t.p[P_FCUT] = 127; t.p[P_FRES] = 50;
|
||||
m.amp0 = m.amp1 = 32767; m.shape = 64 << 8;
|
||||
tsvf_coef(&flt, 127 << 8, 50);
|
||||
song.g[G_BPM] = 120;
|
||||
bar_n = 0; beat_n = 0; beat_pos = 0;
|
||||
lofi_note_on(&t, &v);
|
||||
*steps = 0;
|
||||
for (k = 0; k < TL_BLOCKS; k++) {
|
||||
memset(o, 0, sizeof o);
|
||||
lofi_byte_render(&t, &v, o, CTL, &m, pitch_inc((int32_t)n << 4), 1, 8, &flt);
|
||||
for (i = 0; i < CTL; i++) h = (h ^ (uint32_t)o[i]) * 16777619u;
|
||||
ts[k] = v.ph[1];
|
||||
if ((ts[k] >> 16) != last) { last = ts[k] >> 16; (*steps)++; }
|
||||
beat_pos += CTL; /* (the bar's clock, as seq.c runs it) */
|
||||
if (beat_pos >= beat_samples()) {
|
||||
beat_pos -= beat_samples();
|
||||
beat_n = (beat_n + 1u) & 3u;
|
||||
if (!beat_n) bar_n++;
|
||||
}
|
||||
}
|
||||
return h;
|
||||
}
|
||||
int main(void)
|
||||
{
|
||||
static uint32_t a[TL_BLOCKS], b[TL_BLOCKS], c[TL_BLOCKS], d[TL_BLOCKS];
|
||||
uint32_t sa, sb, sc, sd, k, same = 1, differ = 0;
|
||||
uint32_t ha = take(RW_BLOCK, 60, a, &sa), hb = take(RW_BLOCK, 72, b, &sb);
|
||||
uint32_t hc = take(RW_BYTE, 60, c, &sc), hd = take(RW_BYTE, 72, d, &sd);
|
||||
int bad = 0;
|
||||
for (k = 0; k < TL_BLOCKS; k++) {
|
||||
same &= a[k] == b[k];
|
||||
differ |= c[k] != d[k];
|
||||
}
|
||||
bad += check("SYNC at 120 BPM: C4 and C5 the same slow time, block by block (the same rhythm)", same);
|
||||
bad += check("SYNC: the rhythm steps as many times for both notes", sa == sb && sa > 4u);
|
||||
bad += check("SYNC: the notes still two pitches (different output)", ha != hb);
|
||||
bad += check("BYTE (no lock): the octave runs the rhythm faster (as before)", differ && sd > sc);
|
||||
bad += check("SYNC and BYTE: different time bases at C4", ha != hc);
|
||||
printf("math-timelock: SYNC steps %u / %u, BYTE %u / %u\n", sa, sb, sc, sd);
|
||||
printf(bad ? "math-timelock: %d FAILED\n" : "math-timelock: all ok\n", bad);
|
||||
return bad != 0;
|
||||
}
|
||||
+3
-2
@@ -13731,8 +13731,9 @@ static int test_engine_order_099(void)
|
||||
uint32_t q, e_pc = preset_all_at_in(pc, &q, ENGINE_PC_ORDER);
|
||||
in_pc = e_pc == engine && q == preset;
|
||||
}
|
||||
/* ANIMAL added five sounds after its 24 programs. WEST keeps NOISE's eight. */
|
||||
int browser_only = (engine == ENGI_ANIMAL && preset >= 24u) || (engine == ENGI_WEST && preset >= 8u);
|
||||
/* ANIMAL added five sounds after its 24 programs. WEST keeps NOISE's eight. MATH's 18 (0.9.8's) without BYTE SYNC. */
|
||||
int browser_only = (engine == ENGI_ANIMAL && preset >= 24u) || (engine == ENGI_WEST && preset >= 8u) ||
|
||||
(engine == ENGI_LOFI && preset >= 12u); /* (V10.8.62: MATH's BYTE SYNC, its 18 programs as 0.9.8's) */
|
||||
if (in_pc == browser_only)
|
||||
break;
|
||||
}
|
||||
|
||||
+1334
-1334
File diff suppressed because it is too large.
Load diff
+4
-4
@@ -656,7 +656,7 @@ gen_rs_apply 758 bt drum_track gen_evolve gen_fxs gen_kit gen_mix gen_pick gen_s
|
||||
gen_rs_prep 282 bt drum_track gls_role
|
||||
gen_scale_page 380 text
|
||||
gen_sig 124 text
|
||||
gen_sound 2328 text apply_preset_to gch gnear gnever gpickw gr grg grr semi_pick set_engine_of track_desc trk_engp
|
||||
gen_sound 2364 text apply_preset_to gch gnear gnever gpickw gr grg grr semi_pick set_engine_of track_desc trk_engp
|
||||
gen_texture 174 text dhold gch gchord gnote gseed gtone
|
||||
gen_tick 358 text gen_new_seed gen_press gst_put
|
||||
gen_value 480 text
|
||||
@@ -909,7 +909,7 @@ lock_held 198 text cur_page grid_on key_black key_place live_rec_sel name_on tse
|
||||
lock_id 84 text lock_page_ok motion_param trk_engp tsel_p
|
||||
lock_page_ok 68 text motion_param
|
||||
lofi_byte 1366 text
|
||||
lofi_byte_render 946 text lofi_byte lofi_mut lofi_sync
|
||||
lofi_byte_render 1038 text lofi_byte lofi_mut lofi_sync
|
||||
lofi_desc 84 text *
|
||||
lofi_float 3452 text mul64_sh15
|
||||
lofi_float_render 964 text lofi_float lofi_mut lofi_sync
|
||||
@@ -1029,7 +1029,7 @@ mod_dst_name 50 text bt_hw_seg
|
||||
mod_dst_name_bt 178 bt clamp eng_idx mod_dst_ok track_desc
|
||||
mod_dst_offer 32 text bt_hw_seg
|
||||
mod_dst_offer_bt 92 bt eng_idx mod_dst_ok
|
||||
mod_dst_ok 272 bt eng_idx track_desc
|
||||
mod_dst_ok 280 bt eng_idx track_desc
|
||||
mod_dst_scope 62 text
|
||||
mod_end 66 text
|
||||
mod_midi 54 text
|
||||
@@ -1188,7 +1188,7 @@ param_kept 52 text
|
||||
param_store_def 18 text param_desc_of
|
||||
param_turn 372 text enum_order enum_rank enum_skip name_of
|
||||
params_by_count 58 text
|
||||
part_dice 736 text apply_preset_to chain_busy confirm_open dice_by dk_vis_take drum_elsewhere rng semi_pick track_desc trk_eng tsel_p undo_mark
|
||||
part_dice 754 text apply_preset_to chain_busy confirm_open dice_by dk_vis_take drum_elsewhere rng semi_pick track_desc trk_eng tsel_p undo_mark
|
||||
pb_loop 228 text
|
||||
pb_ring_f 76 text
|
||||
pc_shown 42 text
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ Each engine's EDIT values as its preset 1 shows them (a mode may rename one: DES
|
||||
| PHASE 2 | 121 | SUB | 0..127 | 0 | |
|
||||
| PHASE 2 | 122 | FEEDBK | 0..127 | 0 | |
|
||||
| MATH 3 | 115 | CHIP | 0..3 | 2 | 4BIT 4B/2 8BIT 1BIT |
|
||||
| MATH 3 | 116 | WAVE | 5..6 | 5 | BYTE FLOAT |
|
||||
| MATH 3 | 116 | WAVE | 5..7 | 5 | BYTE FLOAT SYNC |
|
||||
| MATH 3 | 117 | ALGO | 0..191 | 64 | |
|
||||
| MATH 3 | 118 | VARIANT | 0..127 | 0 | |
|
||||
| MATH 3 | 119 | MOTION | 0..255 | 0 | |
|
||||
|
||||
Reference in new issue
Block a user