mirror of
https://github.com/juanjiant-bit/JIANT.git
synced 2026-12-06 04:44:33 +01:00
(the owner: "everything lacks decay and release; it is all at sustain 100, little movement in attack, decay and release"; "the leads with a lot of sustain sound hard: a lot of decay, little sustain and a LOT of release"; "the chords in CALM all filtered the same: the other filter types, the bands above all, the low end left to the bass" .. "the whole generator") - gen_tables.c ENV_RULE (TIME 64 ~0.1 s, 80 ~0.33 s, 96 ~1 s, 104 ~1.9 s), clamped after the sound's preset and its archetype: lead DEC 72..103, SUS 16..47 (37 % at most), REL 80..103 (were 48..95, 56..95, 32..63); a pluck's lead and the arp DEC 56..87, SUS 0..23, REL 64..87; stabbed chords fast in, DEC 64..87, SUS 8..39, REL 64..95; held chords ATK 64..103, SUS 56..95 (75 %), REL 96..119; the bass DEC 56..95, SUS 24..87 (its tail as it was); the others (a texture, a power or a sparse chord) slower at both ends. A held organ's and a drone's sustain theirs. Measured (every genre and EXPLORE x 24 seeds x MOOD -50 / 0 / +50, tests/gen_env48.c): parts over 80 % sustain: bass 19.5 % -> 0, chords 34.1 % -> 2.4 % (the held organs); lead SUS 47 -> 32, REL 49 -> 83; arp REL 48 -> 69 - gen.c gen_sound: on ANALOG's and PHASE's melodic parts a TYPE of their own (chords BP 7 in 16; lead BP / HP 5 / 5; arp 6 / 6; texture 7 / 4), never the part before's band twice; BP at 54, HP at 24 with KEY TRK 100 (the band and the knee follow the notes: measured 1 .. 2 dB down, 15 .. 20 without); FM6's, STRING's, MATH's parts, acid's and dub's their sound's (measured 15 .. 30 dB down through a band); COMB never (measured cancelling 30 dB). The bass's filter as it was. Distribution: chords LP 91 -> 71 %, BP 9 -> 29 %; leads LP 60, HP 20, BP 20 %; arps 71 / 12 / 17 - the track's GAIN the piece's (it kept a piece before's): what a low sustain takes made up (a lead's, an arp's 0 .. +8 dB; a chord's and a bass's half; an ANALOG bass's none), +1 HP, +3 BP; KEY TRK reset with the sound - MOOD CALM's slower attack clamped (a held chord's 110 + 25 read past the TIME table: from V10.8.45 on) - GMIX: JAZZ's bass and ELECTRO METAL's down (their decays longer: over the drums, gen_stems' check) - gl_add in the Bluetooth segment (52 B of the image) - tests: gen_test (a lead's TYPE its own in the archetypes' check; the mix -16.0 dBFS asked, was -15.8, -15.9 measured; the mix pass two basses under and four parts over, were one and three: the sustained energy lower by design), gen_entry_test's MID reference recorded again, tests/gen_env48.c (a study) Image 584304 B of 584336 (32 B free), RAM 96832, RAM code 32688 of 34816, pool spare 8480 B, BT segment 73616 of 73728. audio.c as V23's; the pinned layout as recorded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KMHk6yH4XbP1xxHYKCo9Mh
52 lines
2.8 KiB
C
52 lines
2.8 KiB
C
// Copyright (C) 2026 Juan Ignacio Antonucci (Juan Jiant). All rights reserved.
|
|
/* (V10.8.48, the owner: "everything lacks decay and release, it is all at sustain 100"; "the leads: decay, little sustain,
|
|
* a lot of release"; "the chords all filtered the same: the other filter types, bands above all") a study's tool (host):
|
|
* every genre and EXPLORE x 24 seeds x MOOD -50 / 0 / +50, LOOP form: a role's envelope (ATK DEC SUS REL), its share of
|
|
* parts with SUS over 80 % (102 of 127), its filter types (LP HP BP COMB COMB-), then a genre a line (the mood 0's).
|
|
* cc -O1 -w -Ibuild/gen -Ifirmware/src tests/gen_env48.c -lm -o build/host/gen_env48 */
|
|
#define UI_TEST_NO_MAIN 1
|
|
#include "ui_test.c"
|
|
static const char *const RN[6] = {"DRUM", "BASS", "PAD", "LEAD", "ARP", "TEX"};
|
|
int main(void)
|
|
{
|
|
static const int8_t MOOD[3] = {-50, 0, 50};
|
|
double env[6][4] = {{0}}, ge[NGENRE + 1][6][4];
|
|
uint32_t n[6] = {0}, hi[6] = {0}, ft[6][6] = {{0}}, gn[NGENRE + 1][6];
|
|
uint32_t g, s, m, k, r, i;
|
|
memset(ge, 0, sizeof ge); memset(gn, 0, sizeof gn);
|
|
ui_power_on();
|
|
for (g = 0; g <= NGENRE; g++)
|
|
for (m = 0; m < 3u; m++)
|
|
for (s = 0; s < 24u; s++) {
|
|
gp.genre = (uint8_t)(g == NGENRE ? GEN_EXPLORE : g + 1u);
|
|
gp.form = 0; gp.seed = (uint16_t)(300u + s * 91u);
|
|
grd.on = 0; grd.mood = MOOD[m];
|
|
gen_make();
|
|
for (k = 0; k < NTRK; k++) {
|
|
const track_t *t = &trk[k];
|
|
r = gs.role[k];
|
|
if (k >= trk_live || r > 5u || r == RL_DRUM || !gs.act[r]) continue;
|
|
for (i = 0; i < 4u; i++) env[r][i] += t->p[P_ATK + i];
|
|
n[r]++; hi[r] += t->p[P_SUS] > 101;
|
|
ft[r][(uint32_t)t->p[P_FTYPE] < 5u ? (uint32_t)t->p[P_FTYPE] : 5u]++;
|
|
if (MOOD[m] == 0) { for (i = 0; i < 4u; i++) ge[g][r][i] += t->p[P_ATK + i]; gn[g][r]++; }
|
|
}
|
|
}
|
|
printf("role ATK DEC SUS REL SUS>80%% LP HP BP COMB COMB- (%% of the role's parts)\n");
|
|
for (r = 1; r < 6u; r++) {
|
|
if (!n[r]) continue;
|
|
printf("%-5s %4.0f%4.0f%4.0f%4.0f %5.1f%% ", RN[r], env[r][0] / n[r], env[r][1] / n[r], env[r][2] / n[r], env[r][3] / n[r], 100.0 * hi[r] / n[r]);
|
|
for (i = 0; i < 5u; i++) printf("%4.0f", 100.0 * ft[r][i] / n[r]);
|
|
printf("\n");
|
|
}
|
|
printf("\n%-15s %-15s %-15s %-15s %-15s %-15s\n", "genre (mood 0)", "BASS a/d/s/r", "PAD", "LEAD", "ARP", "TEX");
|
|
for (g = 0; g <= NGENRE; g++) {
|
|
printf("%-15s", g == NGENRE ? "EXPLORE" : GENRE[g].name);
|
|
for (r = 1; r < 6u; r++)
|
|
if (gn[g][r]) printf(" %3.0f/%3.0f/%3.0f/%3.0f", ge[g][r][0] / gn[g][r], ge[g][r][1] / gn[g][r], ge[g][r][2] / gn[g][r], ge[g][r][3] / gn[g][r]);
|
|
else printf(" %-15s", "-");
|
|
printf("\n");
|
|
}
|
|
return 0;
|
|
}
|