mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-05 20:34:27 +01:00
(the owner: "the arp is not quantized, it should be on the 1/16 at least"; "in REC it has to be quantized") - seq.c arp_step_do: playing (or counting in), a key's first arp step on its RATE's grid of the transport (the step this block holds, or one up to 20 ms back at once; armed: never late), then the sequencer's time (seq_n), so it stays there; stopped: from the key, as ever. It ran free from the key's block, on the DAC's samples - rec_note_at: an arp's note recorded at its own step's sample (no key latency, whatever REC Q): on its step, MICRO 0 - tests/arp_grid_test.c (in the workflow): three tempos, four RATEs, 18 moments, every step on the grid; a recorded phrase every step its note, on its place, one a step Room (the owner: "the CPU page out, the little purple bar a number, the velocity diagnostic too"): 720 B - MENU > ABOUT: the CPU lines gone (clock, rails, crash); AUDIO LOAD stays - the header's load: its per cent (0..99) in THEME where the five bars were, following the load once 3 away - the velocity diagnostic out (captures, queue, console, vd_poll); the keys' velocity and pressure as they were; the editor's VEL answers as ever with the diagnostic off and nothing to read (web/vel.html: no presses, no captures); tests/vel_diag_test.c gone, vel_test / vel_seq_test stay GEN (the owner: "a section lasts more than twice what it should, loops that do not evolve and come back the same; every part its timbre, a story in the sound; the envelopes"; "the DJ FILTER's automations too long and abrupt"; "DANCE's decays too long, they cover the other layers"): - a row half its bars and none over ~24 s (a slow tempo's shorter); RADIO's loop 16 / 8 / 4 bars (over 110 / over 74 / slower; were 32 / 16). MY LOOP's rows as they were - a row its own colour: the scene's macros a row's own values (the first as the piece stands); a section come again (its fill row too): the lead's, the arp's and the free drums' lines ARRANGE's VAR 1 / 2 (rows that repeat a row before: 31 % -> 0) - MOOD DANCE: the kit's DECAY a little shorter (was longer), the pump deeper (mood / 2) - the build's high-pass: its last bar to 30 in eighths (was two bars to 48 in quarters) - the envelopes: a held chord slower in (32) and longer out (80), a lead some release (32..63), the filter's envelope 12 .. 27 on a bass, a lead, an arp (was 6 .. 13); towards CALM softer in and longer out - tests: gen_entry_test (RADIO's 16 bars, MID's reference recorded again), ui_test (an arp with no transport's clock), tests/gen_sec.c (a study's tool: rows' seconds, repeats, envelopes) Layout recorded again (FELUCCA_REPIN=keep: the arp's code in the RAM code); the plain build passes. Image 583600 B of 584336 (736 B free), RAM 96832, RAM code 32688 of 34816, pool spare 8480 B, BT segment 73564 of 73728. audio.c as V23's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
54 lines
3.3 KiB
C
54 lines
3.3 KiB
C
// Copyright (C) 2026 Juan Ignacio Antonucci (Juan Jiant). All rights reserved.
|
|
/* (V10.8.45, the owner: "a section lasts more than twice what it should; loops that do not evolve and come back the
|
|
* same; envelopes") a song's rows measured, a genre a line (SONG, 4 seeds): the rows' seconds (mean, the longest), the
|
|
* rows that are a row before them again (section, mutes, sources, variations, the scene's macros), the automation
|
|
* records a piece; then the envelopes a role (ATK DEC SUS REL, the envelope's share of the filter), every genre.
|
|
* A study's tool (host): cc -O1 -w -Ibuild/gen -Ifirmware/src tests/gen_sec.c -lm -o build/host/gen_sec */
|
|
#define UI_TEST_NO_MAIN 1
|
|
#include "ui_test.c"
|
|
|
|
int main(void)
|
|
{
|
|
static const char *const RN[6] = {"DRUM", "BASS", "PAD", "LEAD", "ARP", "TEX"};
|
|
double env[6][5] = {{0}}, tsec = 0, tmax = 0, tsame = 0, trow = 0, tmot = 0;
|
|
uint32_t envn[6] = {0}, g, r, k;
|
|
ui_power_on();
|
|
printf("%-16s %5s %7s %7s %6s %7s\n", "genre", "BPM", "row s", "max s", "same%", "motion");
|
|
for (g = 0; g <= NGENRE; g++) {
|
|
double sec = 0, mx = 0, mot = 0, bpm = 0; uint32_t rows = 0, same = 0;
|
|
for (r = 0; r < 4u; r++) {
|
|
uint32_t i, j;
|
|
gp.genre = (uint8_t)(g == NGENRE ? GEN_EXPLORE : g + 1u);
|
|
gp.form = 2; gp.seed = (uint16_t)(300u + r * 91u);
|
|
grd.on = 0; grd.mood = 0;
|
|
gen_make();
|
|
bpm += song.g[G_BPM];
|
|
mot += motion.count;
|
|
for (i = 0; i < chain_config.count; i++) {
|
|
double s = chain_config.row[i].bars * 240.0 / song.g[G_BPM];
|
|
const scene_t *a = &song_idx.scene[song_cur][i];
|
|
sec += s; rows++; if (s > mx) mx = s;
|
|
for (j = 0; j < i; j++) {
|
|
const scene_t *b = &song_idx.scene[song_cur][j];
|
|
if (chain_config.row[j].slot == chain_config.row[i].slot && a->mute == b->mute && a->on == b->on &&
|
|
song_idx.tsrc[song_cur][i] == song_idx.tsrc[song_cur][j] && song_idx.tvar[song_cur][i] == song_idx.tvar[song_cur][j] &&
|
|
!memcmp(a->mac, b->mac, sizeof a->mac)) { same++; break; }
|
|
}
|
|
}
|
|
for (k = 0; k < NTRK; k++) {
|
|
uint32_t role = gs.role[k];
|
|
if (k >= trk_live || role > 5u || !gs.act[role]) continue;
|
|
env[role][0] += trk[k].p[P_ATK]; env[role][1] += trk[k].p[P_DEC]; env[role][2] += trk[k].p[P_SUS];
|
|
env[role][3] += trk[k].p[P_REL]; env[role][4] += trk[k].p[P_ED_FLT]; envn[role]++;
|
|
}
|
|
}
|
|
printf("%-16s %5.0f %7.1f %7.1f %6.0f %7.1f\n", g == NGENRE ? "EXPLORE" : GENRE[g].name, bpm / 4, rows ? sec / rows : 0, mx,
|
|
rows ? 100.0 * same / rows : 0, mot / 4);
|
|
tsec += sec; trow += rows; tsame += same; tmot += mot; if (mx > tmax) tmax = mx;
|
|
}
|
|
printf("%-16s %5s %7.1f %7.1f %6.0f %7.1f\n\n", "ALL", "", tsec / trow, tmax, 100.0 * tsame / trow, tmot / 4 / (NGENRE + 1));
|
|
printf("%-6s %5s %5s %5s %5s %7s\n", "role", "ATK", "DEC", "SUS", "REL", "ENV>FLT");
|
|
for (r = 0; r < 6u; r++) if (envn[r]) printf("%-6s %5.0f %5.0f %5.0f %5.0f %7.0f\n", RN[r], env[r][0] / envn[r], env[r][1] / envn[r], env[r][2] / envn[r], env[r][3] / envn[r], env[r][4] / envn[r]);
|
|
return 0;
|
|
}
|