mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-06 12:54:29 +01:00
Merge codex/repeat (a1ce4d33) into V10.8.86
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
This commit is contained in:
8 files changed
+184
-31
No files matched your search
+3
-2
@@ -2616,8 +2616,9 @@ las pistas sobre las que actúa (ALL, SYN, DRM). Para grabar: REC armado y tocan
|
||||
la tecla del efecto; los pasos que pasa lo reciben; **G5** sostenido borra por donde pasa el cabezal. Se guarda con
|
||||
la sección.
|
||||
|
||||
- **Sobre el audio**: REPEAT 1/8, 1/16, 1/32 (F3 G3 A3), LPF (B3), HPF (C4). REPEAT arranca en la siguiente 1/16
|
||||
mientras suena. Por debajo de unos 81 BPM, REPEAT 1/8 es demasiado largo para su buffer y aparece atenuado.
|
||||
- **Sobre el audio**: REPEAT 1/8, 1/16, 1/32 (F3 G3 A3), LPF (B3), HPF (C4). REPEAT arranca en el siguiente tiempo
|
||||
mientras suena y repite el primer 1/8, 1/16 o 1/32 de ese tiempo, en fase con el compás; uno más corto encima (un
|
||||
redoble) cambia en la siguiente 1/16. Parado, al instante. Por debajo de unos 81 BPM, REPEAT 1/8 es demasiado largo para su buffer y aparece atenuado.
|
||||
- **Sobre las notas**: OCT− / OCT+ (D4 E4), 1/2 TEMPO (F4), DEC− (corto, punteado) / DEC+ (largo) (G4 A4), STUTTER
|
||||
1/8 / 1/16 (B4 C5), ATK+ (ataques lentos, baterías incluidas) (D5), ARP (E5; en una pista DRUM, un fill nuevo en cada
|
||||
pulsación), RANDOM (F5). Entran en la siguiente 1/16. **A#4** elige a qué pistas afectan: ALL, SYN (sintes) o DRM
|
||||
|
||||
+3
-2
@@ -2476,8 +2476,9 @@ the lane's cells in the effects' colours with the playhead on them, the last eff
|
||||
on (ALL, SYN, DRM). To record: REC armed and playing (not in a song), hold FX and the effect's key; the steps it
|
||||
passes get it; **G5** held erases where the playhead passes. Saved with the section.
|
||||
|
||||
- **On the audio**: REPEAT 1/8, 1/16, 1/32 (F3 G3 A3), LPF (B3), HPF (C4). REPEAT starts on the next 1/16 while
|
||||
playing. Below about 81 BPM, REPEAT 1/8 is too long for its buffer and is shown dimmed.
|
||||
- **On the audio**: REPEAT 1/8, 1/16, 1/32 (F3 G3 A3), LPF (B3), HPF (C4). REPEAT starts on the next beat while
|
||||
playing and repeats that beat's first 1/8, 1/16 or 1/32, in time with the bar; a shorter one held over it (a roll)
|
||||
switches on the next 1/16. Stopped, at once. Below about 81 BPM, REPEAT 1/8 is too long for its buffer and is shown dimmed.
|
||||
- **On the notes**: OCT− / OCT+ (D4 E4), 1/2 TEMPO (F4), DEC− (short, plucky) / DEC+ (long) (G4 A4), STUTTER 1/8 / 1/16
|
||||
(B4 C5), ATK+ (slow attacks, drums too) (D5), ARP (E5; on a DRUM track a new fill every press), RANDOM (F5). They come
|
||||
in on the next 1/16. **A#4** chooses which tracks they touch: ALL, SYN (synths) or DRM (drums); the header shows it.
|
||||
|
||||
+45
-8
@@ -12,9 +12,11 @@
|
||||
* SHUFFLE, FREEZE and the sweeps are not here: the app slot (flash) has a few hundred bytes left.
|
||||
* TONIC keeps only the audio stutters (REPEAT): REVERSE, TAPE STOP, FREEZE and OCT UP / DN (the harmonizer) were
|
||||
* removed; the punch-in effects of TONIC act on the notes instead (FELUCCA-TONIC-SPEC.md).
|
||||
* REPEAT starts on the next 1/16 (at once while stopped); the filters at once; all end when let go, with a 2.9 ms
|
||||
* ramp. Effects of different kinds stack; of the REPEATs the last pressed plays, and letting it go returns to the
|
||||
* one held before.
|
||||
* REPEAT starts on the next beat (V10.8.86: its slice the beat's first 1/8, 1/16, 1/32, the repeats with the bar; a
|
||||
* shorter one than the loop recorded, a roll, on the next 1/16, in the bar's phase; perf_q), the other buffer effects
|
||||
* on the next 1/16 (all at once while stopped); the filters at once; all end when let go, with a 2.9 ms ramp. Effects
|
||||
* of different kinds stack; of the REPEATs the last pressed plays, and letting it go returns to the one held before
|
||||
* (V10.8.86: in the bar's phase, perf_grid).
|
||||
* The buffer: the SLICER's recordings (sl_buf, 32 KB) borrowed as one stereo loop of 8192 frames at 22.05 kHz
|
||||
* (371 ms). While borrowed, STUT tracks play live; their recordings are dropped afterwards. A REPEAT 1/8 longer
|
||||
* than the loop at the tempo (below 81 BPM) records at 11 kHz (V10.59: lo-fi, down to ~41 BPM; slower: dimmed).
|
||||
@@ -39,7 +41,7 @@ _Static_assert(PF_N == 26 && PF_CLR == 27 && PF_STR == 21 && PF_PDN == 24, "PF b
|
||||
#define PF_BIT(e) (1u << (e))
|
||||
#define PF_REPEAT 0x7u /* the three REPEAT rates */
|
||||
#define PF_PITCH (PF_BIT(PF_PUP) | PF_BIT(PF_PDN))
|
||||
#define PF_Q (PF_REPEAT | PF_BIT(PF_REV) | PF_BIT(PF_TAPE) | PF_BIT(PF_STR)) /* start on the 1/16 */
|
||||
#define PF_Q (PF_REPEAT | PF_BIT(PF_REV) | PF_BIT(PF_TAPE) | PF_BIT(PF_STR)) /* start on the 1/16 (REPEAT: the beat) */
|
||||
#define PF_BUF (PF_Q | PF_PITCH) /* the buffer effects (the last pressed plays) */
|
||||
#define PF_LOOPS PF_BIT(PF_LP3) /* (snd2) on the sequencer (pfx.c), as the MIDI ones */
|
||||
#define PF_MUTE (((1u << NTRK) - 1u) << PF_M1)
|
||||
@@ -235,6 +237,15 @@ static __attribute__((noinline)) void perf_buf_start(uint32_t e)
|
||||
}
|
||||
}
|
||||
|
||||
/* (V10.8.86) the switch to a REPEAT's loop (pf.src, pf.len), read where the bar is (a loop recorded from a beat): in
|
||||
* phase when a roll starts on a 1/16, or a REPEAT let go gives the one held before back mid-beat (it was played from its
|
||||
* start: off the beat). At the block's start, or at pf.split for one started there (perf_block); stopped: from its
|
||||
* start. Out of perf_switch (its size pinned: tools/audio_layout.txt) */
|
||||
static __attribute__((noinline)) void perf_grid(void)
|
||||
{
|
||||
uint32_t off = (pf.act & ~pf.act0) >> pf.src & 1u ? pf.split : 0u;
|
||||
pf.rp = song.playing && clk_pos != CLK_START ? ((clk_n & 3u) * pf.P + clk_pos + off) % pf.len : 0u;
|
||||
}
|
||||
/* the buffer effect to play becomes e (at a 1/16): a shorter REPEAT of what is
|
||||
* recorded switches with a cross-fade, anything else fades the old one out first */
|
||||
static void perf_buf_select(uint32_t e)
|
||||
@@ -249,7 +260,7 @@ static void perf_buf_select(uint32_t e)
|
||||
pf.src = (uint8_t)e;
|
||||
pf.next = PF_N;
|
||||
pf.len = perf_len(e);
|
||||
pf.rp = 0;
|
||||
perf_grid();
|
||||
return;
|
||||
}
|
||||
if (pf.mode == BM_NONE || !pf.w) {
|
||||
@@ -307,6 +318,30 @@ static __attribute__((noinline)) uint32_t pk_step(uint32_t n)
|
||||
return 0;
|
||||
}
|
||||
static uint32_t (*const volatile PERF_PK)(uint32_t) = pk_step; /* (out of perf_begin's RAM code: its reach) */
|
||||
/* (V10.8.86, a user's, the owner: "cuantizar el inicio") the 1/16 effects q pressed start at the 1/16 bnd of this block
|
||||
* (pf.split: its n samples, none at n; stopped: at once). A REPEAT that records waits for the beat (the transport's 1/16
|
||||
* a multiple of 4; no clock yet: PLAY's), so the slice it repeats is the beat's first 1/8, 1/16, 1/32 and its repeats
|
||||
* stay with the bar (Fatboy Slim's stutter); one no longer than the loop a REPEAT has recorded (a roll, 1/8 -> 1/16 ->
|
||||
* 1/32) needs no recording: on the 1/16, read where the bar is (perf_grid). Out of perf_begin's RAM code. (The buffer
|
||||
* is the SLICER's until a press: nothing recorded before it, so a press just after the beat waits for the next one) */
|
||||
static __attribute__((noinline)) void perf_q(uint32_t q, uint32_t bnd)
|
||||
{
|
||||
uint32_t e, n = pf.split;
|
||||
if (!song.playing) {
|
||||
pf.split = 0;
|
||||
} else {
|
||||
if (bnd >= n)
|
||||
return;
|
||||
if ((clk_pos != CLK_START ? clk_n + (clk_pos + bnd) / pf.P : (pf.ph - n + bnd) / pf.P) & 3u) /* (not a beat) */
|
||||
for (e = PF_R8; e <= PF_R32; e++)
|
||||
if (!(pf.mode == BM_LOOP && pf.state && pf.src != PF_N && perf_len(e) <= pf.wr << pf.q))
|
||||
q &= ~PF_BIT(e);
|
||||
if (!q)
|
||||
return;
|
||||
pf.split = bnd;
|
||||
}
|
||||
pf.act |= q;
|
||||
}
|
||||
static __attribute__((noinline)) int perf_begin(uint32_t n)
|
||||
{
|
||||
uint32_t held = perf_kill ? 0u : (perf_held | perf_latched | PERF_PK(n) | (perf_solo ? (~(uint32_t)perf_solo & ((1u << NTRK) - 1u)) << PF_M1 : 0u)) & perf_avail() & ~(PF_MIDI | PF_LOOPS);
|
||||
@@ -335,9 +370,11 @@ static __attribute__((noinline)) int perf_begin(uint32_t n)
|
||||
pf.act0 = pf.act;
|
||||
q = held & PF_Q & ~pf.act;
|
||||
pf.split = n;
|
||||
if (q && (!song.playing || bnd < n)) {
|
||||
pf.split = song.playing ? bnd : 0u;
|
||||
pf.act |= q;
|
||||
if (q) { /* (V10.8.86: REPEAT on the beat; through a register: out of the RAM
|
||||
* code's reach, no constant moved: tools/audio_layout.txt) */
|
||||
void (*f)(uint32_t, uint32_t) = perf_q;
|
||||
FM1_OPAQUE(f);
|
||||
f(q, bnd);
|
||||
}
|
||||
perf_act = pf.act;
|
||||
if (pf.act & PF_BIT(PF_FRZ)) /* (V10.7.59) FREEZE: the reverb's SIZE at its top (mod.c's offset,
|
||||
|
||||
@@ -1246,6 +1246,11 @@ static void pk_load(void) /* the slot played, from
|
||||
for (s = 0; s < PK_KEYS; s++)
|
||||
if ((pk.e[s] & 31u) > PK_N || (pk.e[s] > 31u && (pk.e[s] & 31u) != PK_MOD + 1u)) pk.e[s] = 0; /* (unknown: the
|
||||
* map's own; bit 5 a PARAM key's HOW only) */
|
||||
else if (pk.e[s] && pk.e[s] <= PF_R32 + 1u && (pk.o[s] & 0x20u))
|
||||
pk.o[s] &= (uint8_t)~0x30u; /* (V10.8.86, the owner) a REPEAT key's QUANT plays as HOLD: REPEAT
|
||||
* starts on the beat itself (perform.c perf_q); QUANT's wait
|
||||
* (pk_step, the block after the beat) put it a beat late. The
|
||||
* slot keeps QUANT (the editor shows it) */
|
||||
pk.qpend = pk.exd = pk.exs = 0;
|
||||
memset(pk.mt, 0, sizeof pk.mt);
|
||||
pk.mod = pk.mon = pk.edit = pk.pkey = 0;
|
||||
|
||||
@@ -107,6 +107,39 @@ int main(void)
|
||||
bad += check("PUNCH-IN EDITOR: OCT+ on FX > PUNCH IN opens, a key + KNOB 1 / 2 its effect and how, OCT+ saves, OCT- leaves; LATCH, QUANT play so", ok);
|
||||
memset(&favorites.factory[0][5], 0, 27); memset(&favorites.factory[2][5], 0, 27); pk.magic = 0; frame();
|
||||
}
|
||||
{ /* (V10.8.86, the owner) a REPEAT key set to QUANT in the editor starts on the same beat as a plain one (HOLD):
|
||||
* the first beat after the press, QUANT adding nothing (it waited for the beat, then REPEAT for the next) */
|
||||
static int32_t o[2 * CTL];
|
||||
uint32_t s0 = key_at(0, 0), m, b, P, at[2] = {0, 0}, pr[2] = {0, 0};
|
||||
ok = 1;
|
||||
for (m = 0; m < 2u; m++) {
|
||||
sine_song();
|
||||
memset(&favorites.factory[0][5], 0, 27); memset(&favorites.factory[2][5], 0, 27);
|
||||
memset(&favorites.factory[7][5], 0, 27);
|
||||
favorites.factory[6][18] = 0;
|
||||
favorites.factory[0][5] = PF_R16 + 1u; /* (slot A, F3: RPT 1/16, HOLD or QUANT) */
|
||||
favorites.factory[2][5] = (uint8_t)(m ? 2u << 4 : 0u);
|
||||
pk.magic = 0; frame();
|
||||
transport_req = 1;
|
||||
btn_down(B_FX); frames(480);
|
||||
for (b = 0; b < 500u + 37u * m; b++) mix_block(o, CTL); /* (the transport running: mid-beat, not the same
|
||||
* place twice) */
|
||||
P = div_samples(2);
|
||||
key_down(s0);
|
||||
for (b = 0; b < 1000u && !(perf_act & PF_BIT(PF_R16)); b++) {
|
||||
mix_block(o, CTL); /* (clk_pos, clk_n: this block's start) */
|
||||
if (!b) pr[m] = clk_n * P + clk_pos; /* (the block the key is seen in) */
|
||||
if (perf_act & PF_BIT(PF_R16)) at[m] = clk_n * P + clk_pos + pf.split;
|
||||
}
|
||||
ok &= at[m] && !(at[m] % (4u * P)) && at[m] > pr[m] && at[m] - pr[m] <= 4u * P;
|
||||
key_up(s0); frames(32); btn_up(B_FX); frames(64);
|
||||
transport_req = 2; frames(8);
|
||||
}
|
||||
if (!ok) printf(" quant: HOLD pressed at %u, started %u; QUANT pressed at %u, started %u (a beat %u)\n", pr[0], at[0],
|
||||
pr[1], at[1], 4u * P);
|
||||
bad += check("PUNCH-IN EDITOR: a REPEAT key on QUANT starts on the first beat after the press, as one on HOLD", ok);
|
||||
memset(&favorites.factory[0][5], 0, 27); memset(&favorites.factory[2][5], 0, 27); pk.magic = 0; frame();
|
||||
}
|
||||
{ /* (V10.7.65) MOD: a key moves its macro (TARGET M2, RAMP UP over a beat) while held, as it was when let go;
|
||||
* SELECT in the editor picks the slot, OCT+ saves and plays it */
|
||||
uint32_t s0 = key_at(0, 0), mv, mx = 0, k;
|
||||
|
||||
+91
-16
@@ -3,8 +3,10 @@
|
||||
* Portions Copyright (C) 2026 Juan Ignacio Antonucci (Juan Jiant) */
|
||||
/* Host test of the FX hold layer's effects (firmware/src/perform.c), same sources as the firmware (through
|
||||
* hostsim.c). build/host/perform_test [DEMO_DIR] (run_tests.sh: build/perform_demo)
|
||||
* 1. timing: REPEAT starts on the next 1/16 of the transport (sample exact) and ends when let go (the live
|
||||
* signal back, bit for bit, after the 2.9 ms ramp); the filters start at once.
|
||||
* 1. timing: REPEAT starts on the next beat of the transport (sample exact; V10.8.86, was the 1/16) and ends when let
|
||||
* go (the live signal back, bit for bit, after the 2.9 ms ramp); the filters start at once. On the beat (V10.8.86):
|
||||
* 1/8 1/16 1/32 at three tempos, pressed early, mid and late in a beat, repeat the beat's first 1/8 1/16 1/32 in the
|
||||
* bar's phase; a roll (a shorter one held) switches on the 1/16 and a let go gives the one before back, both in phase.
|
||||
* 2. stereo: REPEAT keeps left and right apart (a silent right channel stays silent; each side follows its
|
||||
* own input).
|
||||
* 3. a REPEAT too long for the loop (1/8 below 81 BPM) does nothing at all.
|
||||
@@ -124,20 +126,20 @@ static int test_timing(void)
|
||||
int bad = 0;
|
||||
char what[160];
|
||||
test_signal(440, 12000, 277, 9000);
|
||||
{ /* REPEAT 1/16: pressed mid-1/16, records the next 1/16, then loops it */
|
||||
ev_t ev[] = {{992, PF_R16 + 1}, {20000, -(PF_R16 + 1)}};
|
||||
{ /* REPEAT 1/16: pressed in the first beat's first 1/16, records the next beat's first 1/16, then loops it */
|
||||
ev_t ev[] = {{992, PF_R16 + 1}, {40000, -(PF_R16 + 1)}};
|
||||
int32_t el, er, el2;
|
||||
run(120, 1, ev, 2, 40000);
|
||||
run(120, 1, ev, 2, 60000);
|
||||
shift_d = P16;
|
||||
el = err_vs(2 * P16 + 160, 3 * P16 - 160, delayed, 0);
|
||||
er = err_vs(2 * P16 + 160, 3 * P16 - 160, delayed, 1);
|
||||
el = err_vs(5 * P16 + 160, 6 * P16 - 160, delayed, 0);
|
||||
er = err_vs(5 * P16 + 160, 6 * P16 - 160, delayed, 1);
|
||||
shift_d = 2 * P16;
|
||||
el2 = err_vs(3 * P16 + 160, 20000 - 160, delayed, 0);
|
||||
snprintf(what, sizeof what, "REPEAT 1/16: live until the 1/16 after the press + one 1/16 (exact)");
|
||||
bad += check(what, same(0, 2 * P16));
|
||||
snprintf(what, sizeof what, " then the 1/16 from that 1/16, looped (error L %d R %d, 2nd pass %d of 12000)", el, er, el2);
|
||||
el2 = err_vs(6 * P16 + 160, 7 * P16 - 160, delayed, 0);
|
||||
snprintf(what, sizeof what, "REPEAT 1/16: live until the beat after the press + one 1/16 (exact)");
|
||||
bad += check(what, same(0, 5 * P16));
|
||||
snprintf(what, sizeof what, " then the beat's first 1/16, looped (error L %d R %d, 2nd pass %d of 12000)", el, er, el2);
|
||||
bad += check(what, el < 100 && er < 100 && el2 < 100);
|
||||
bad += check(" let go: the live signal again after the ramp, bit for bit", same(20000 + 160, 40000));
|
||||
bad += check(" let go: the live signal again after the ramp, bit for bit", same(40000 + 160, 60000));
|
||||
bad += check(" the buffer given back, nothing left running", !sl_lent && pf.mode == BM_NONE && !pf.busy);
|
||||
}
|
||||
{ /* stopped: at once */
|
||||
@@ -153,6 +155,76 @@ static int test_timing(void)
|
||||
return bad;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- 1b. on the beat --- */
|
||||
/* out against the loop of len from the beat B, in[B + (t - B) % len], on [a, b) away (160) from each pass's ends (their
|
||||
* 2.9 ms windows); the worst error */
|
||||
static int32_t beat_err(uint32_t B, uint32_t len, uint32_t a, uint32_t b)
|
||||
{
|
||||
uint32_t t;
|
||||
int32_t e = 0;
|
||||
for (t = a; t < b; t++) {
|
||||
uint32_t r = (t - B) % len, s = B + r;
|
||||
int32_t d;
|
||||
if (r < 160u || r + 160u >= len)
|
||||
continue;
|
||||
d = abs(out_l[t] - in_l[s]);
|
||||
d = abs(out_r[t] - in_r[s]) > d ? abs(out_r[t] - in_r[s]) : d;
|
||||
e = d > e ? d : e;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
static int test_beat(void)
|
||||
{
|
||||
static const uint32_t BPM[3] = {93, 120, 137};
|
||||
static const char *const NM[3] = {"1/8", "1/16", "1/32"};
|
||||
static const uint32_t AT[3] = {3, 50, 97}; /* the press: % into the second beat */
|
||||
uint32_t b, e, k;
|
||||
int bad = 0, fails = 0;
|
||||
char what[200];
|
||||
test_signal(440, 12000, 277, 9000);
|
||||
for (b = 0; b < 3u; b++)
|
||||
for (e = PF_R8; e <= PF_R32; e++)
|
||||
for (k = 0; k < 3u; k++) {
|
||||
uint32_t beat, len, t0, B, at;
|
||||
int32_t err;
|
||||
song.g[G_BPM] = (int16_t)BPM[b];
|
||||
beat = beat_samples();
|
||||
len = beat / PF_DEN[e];
|
||||
at = beat + beat * AT[k] / 100u;
|
||||
{
|
||||
ev_t ev[] = {{at, (int)e + 1}, {at + 3u * beat, -((int)e + 1)}};
|
||||
run(BPM[b], 1, ev, 2, at + 4u * beat);
|
||||
}
|
||||
t0 = (at + CTL - 1u) / CTL * CTL; /* (the block the press is seen in) */
|
||||
B = (t0 + beat - 1u) / beat * beat; /* the next beat (or this one, on it) */
|
||||
err = beat_err(B, len, B + len, at + 3u * beat);
|
||||
snprintf(what, sizeof what, "on the beat: REPEAT %s at %u BPM pressed %u %% into a beat: live to the beat, then "
|
||||
"its first %s (error %d)", NM[e], BPM[b], AT[k], NM[e], err);
|
||||
if (!(same(0, B) && !same(B, B + len + 160u) && err < 100)) {
|
||||
fails++;
|
||||
bad += check(what, 0);
|
||||
}
|
||||
}
|
||||
snprintf(what, sizeof what, "on the beat: REPEAT 1/8 1/16 1/32 x 93 120 137 BPM x early, mid, late: the beat's slice, "
|
||||
"in phase (%d of 27 off)", fails);
|
||||
bad += check(what, !fails);
|
||||
{ /* a roll: 1/8 on the beat, 1/16 pressed mid-1/16 (its switch on the 1/16, in phase), let go mid-1/16 (the 1/8
|
||||
* back, in phase) */
|
||||
uint32_t B = 2u * 4u * P16;
|
||||
ev_t ev[] = {{4u * P16 + 2000u, PF_R8 + 1}, {B + 2u * P16 + 3000u, PF_R16 + 1}, {B + 6u * P16 + 2500u, -(PF_R16 + 1)},
|
||||
{B + 12u * P16, -(PF_R8 + 1)}};
|
||||
int32_t e8, e16, eb;
|
||||
run(120, 1, ev, 4, B + 13u * P16);
|
||||
e8 = beat_err(B, 2u * P16, B + 2u * P16, B + 3u * P16);
|
||||
e16 = beat_err(B, P16, B + 3u * P16 + 160u, B + 6u * P16 + 2496u);
|
||||
eb = beat_err(B, 2u * P16, B + 6u * P16 + 2560u + 160u, B + 12u * P16);
|
||||
snprintf(what, sizeof what, " a roll: 1/8 on the beat, 1/16 from the next 1/16, the 1/8 back mid-1/16, all in "
|
||||
"phase (errors %d %d %d)", e8, e16, eb);
|
||||
bad += check(what, same(0, B) && e8 < 100 && e16 < 100 && eb < 100);
|
||||
}
|
||||
return bad;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ 2. stereo --- */
|
||||
static int test_stereo(void)
|
||||
{
|
||||
@@ -192,14 +264,16 @@ static int test_too_long(void)
|
||||
{
|
||||
int bad = 0;
|
||||
ev_t ev[] = {{992, PF_R8 + 1}, {40000, -(PF_R8 + 1)}};
|
||||
ev_t e72[] = {{992, PF_R8 + 1}, {100000, -(PF_R8 + 1)}};
|
||||
test_signal(440, 12000, 277, 9000);
|
||||
run(72, 1, ev, 2, 50000);
|
||||
run(72, 1, e72, 2, 110000);
|
||||
bad += check("REPEAT 1/8 at 72 BPM (417 ms, the loop holds 371 at 22 kHz): V10.59 plays it at 11 kHz (lo-fi)",
|
||||
!same(0, 40000) && (perf_avail() & PF_BIT(PF_R8)));
|
||||
!same(0, 100000) && (perf_avail() & PF_BIT(PF_R8)));
|
||||
{ /* (V10.59) the 11 kHz loop repeats: a 1/8 later the same (a 440 Hz / 277 Hz pair: within the lo-fi's error) */
|
||||
char what[160];
|
||||
uint32_t L = div_samples(1), t, a0 = 30000u; /* (V10.8.40: the sequencer's 1/8, a beat a multiple of 24 samples) */ /* (recorded from the 1/16 after 992, played
|
||||
* a 1/8 later: the input of a 1/8 before) */
|
||||
uint32_t L = div_samples(1), t, a0 = beat_samples() + L + 1000u; /* (V10.8.40: the sequencer's 1/8, a beat a
|
||||
* multiple of 24 samples) (V10.8.86: recorded from the beat after
|
||||
* 992, played a 1/8 later: the input of a 1/8 before) */
|
||||
double e = 0, p = 0;
|
||||
for (t = a0; t < a0 + 4000u; t++) {
|
||||
double d = (double)out_l[t] - in_l[t - L];
|
||||
@@ -1054,6 +1128,7 @@ int main(int argc, char **argv)
|
||||
bad += test_loops();
|
||||
bad += test_new();
|
||||
bad += test_timing();
|
||||
bad += test_beat();
|
||||
bad += test_stereo();
|
||||
bad += test_too_long();
|
||||
bad += test_slicer();
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@
|
||||
# MOD (tests/mod_test.c): the modulation matrix: slots that do nothing are bit-identical, every source on each
|
||||
# kind of destination, clamping, MIDI CC1 / CC11 / aftertouch routing, the cost of 4 active
|
||||
# slots (at most +5 %), demos in build/mod_demo/.
|
||||
# PERFORM (tests/perform_test.c): the FX hold layer (src/perform.c): 1/16 starts, stereo buffer effects, the
|
||||
# PERFORM (tests/perform_test.c): the FX hold layer (src/perform.c): REPEAT on the beat, 1/16 starts, stereo buffer effects, the
|
||||
# too-long REPEAT, the SLICER interplay, silent layer keys, idle bit-identical, cost; build/perform_demo/;
|
||||
# REVERB (tests/reverb_test.c): REVERB TYPE (src/fx.c): ROOM bit for bit as its reference (V10.7.17: a 4-line network),
|
||||
# its echo density, its decay as the old combs', its tail ending in exact 0; SPRING's decay against SIZE,
|
||||
@@ -361,7 +361,7 @@ if [ -f build/gen/felucca_tables.h ]; then
|
||||
run "SWING: track + global at most 100, sequencer and SLICER step lengths, the SWG display" "$OUT/swing_test"
|
||||
$CC -O2 -w -Ibuild/gen -Ifirmware/src -o "$OUT/perform_test" tests/perform_test.c -lm
|
||||
mkdir -p build/perform_demo build/fx_demo
|
||||
run "FX layer effects: on the 1/16, stereo, too-long REPEAT, SLICER, silent keys, idle bit-identical, clicks, cost, demos" "$OUT/perform_test" build/perform_demo
|
||||
run "FX layer effects: REPEAT on the beat, the others on the 1/16, stereo, too-long REPEAT, SLICER, silent keys, idle bit-identical, clicks, cost, demos" "$OUT/perform_test" build/perform_demo
|
||||
$CC -O2 -w -Ibuild/gen -Ifirmware/src -o "$OUT/reverb_test" tests/reverb_test.c -lm
|
||||
run "REVERB TYPE: ROOM bit-identical, dense, clean end, SPRING decay / chirp / stability / level, model change, cost, demos" "$OUT/reverb_test" build/fx_demo
|
||||
$CC -O2 -w -Ibuild/gen -Ifirmware/src -o "$OUT/cloud_hot_test" tests/cloud_hot_test.c -lm
|
||||
|
||||
+2
-1
@@ -421,7 +421,8 @@ def late_fns():
|
||||
"scr_rows", "vx_swarm", "gen_make", "bt_hw_status",
|
||||
"gen_radio", "gen_tick", "gen_draw_sig", "bt_get", "hold_banner",
|
||||
"tl_do", "tl_stretch", "tl_repeat", "tl_motion_map", "seq_overlay", "tl_nudge", "nudge_key", "home_life", "up_value", "sel_poll", "tl_shape", "song_save_as", "undo_ui", "section_store", "param_format",
|
||||
"wv_span", "wv_span_add"} # (V10.8.52) the save confirm and its undo # (V10.8.49) SEQ TOOLS STRETCH SQUEEZE REPEAT # (V10.8.39) GEN's radio: UI, past the tables # (V10.8.26) the screen mirror's row check: past the tables
|
||||
"wv_span", "wv_span_add",
|
||||
"pk_load"} # (V10.8.86) a REPEAT key's QUANT played as HOLD: its gap before perf_slot overflowed # (V10.8.52) the save confirm and its undo # (V10.8.49) SEQ TOOLS STRETCH SQUEEZE REPEAT # (V10.8.39) GEN's radio: UI, past the tables # (V10.8.26) the screen mirror's row check: past the tables
|
||||
for f in LATE_SRC:
|
||||
names |= set(re.findall(r"^static [^;=()]*?\b(\w+)\((?![^)]*\)\s*;)", (FW / "src" / f).read_text(), flags=re.M))
|
||||
return names
|
||||
|
||||
Reference in new issue
Block a user