gen6e: a note on a voice still in its release starts (it was let go at once): releases ate the next steps

voice_start_rec (a start kept for its sample, ctl64) took the voice's stage 3 for 'let go since asked',
but that was the note before's release, ringing up to the new note's sample: every note on a voice in
its release (MONO / LEGATO always, POLY on a repeated note, the arp) started and was released at once,
so with some release each step came quieter until the sound died. Now: the gate down (voice_off_at) or
a voice given up (stage 4). Same size (pinned). ui_test: REL 96, every step as loud as the first.
Goldens: song/4track_mix, slicer/song_gate_stut (their repeated notes now sound).

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-10-25 01:23:30 +00:00
1 parent 8d85245420
commit b58779343d
3 files changed
+41 -3

No files matched your search

+5 -1
View File
@@ -949,7 +949,11 @@ static __attribute__((noinline)) void voice_start_rec(track_t *t, voice_t *v)
uint8_t mv = t->m_vel, tch = t->dtch;
int16_t mr = t->m_rnd, db = t->dbend;
uint16_t dbt = t->dbt;
uint32_t off = !v->gate || v->stage == 3u; /* let go (or ended) since it was asked for: on, then off */
uint32_t off = !v->gate || v->stage == 4u; /* let go since it was asked for (voice_off_at: the gate down), or
* given up: on, then off. (gen6e, the owner and a tester: not
* stage 3: that was the note before's release, still ringing up
* to this one's sample, so every note on a voice in its release
* was let go at once: a release ate the steps after it) */
t->hum_env = v->pn_henv; t->m_vel = v->pn_mvel; t->m_rnd = v->pn_mrnd;
t->dpit = v->pn_dpit; t->dbend = v->pn_dbend; t->dbt = v->pn_dbt; t->dtch = v->pn_tch;
v->fine = v->pn_fine;
+2 -2
View File
@@ -178,6 +178,6 @@ sends/ANALOG/delay 42494d45f31d28d8
sends/ANALOG/reverb 80bc5bee844683a0
sends/ANALOG/all 7df40199cca50a8d
sends/ANALOG/dist 51f3ea975a0b6994
song/4track_mix a4bf0a2d90aa1db3
song/4track_mix 0297341c639dda68
slicer/gate/ANALOG_ACID 7a40cf2a7ffa8b0c
slicer/song_gate_stut d2897fac9c04684a
slicer/song_gate_stut c27edd07c97c8718
+34
View File
@@ -617,6 +617,40 @@ static int test_transitions(void)
j0 = tr_jump(t, 30u, 7u, 2, 0);
bad += check("WAVE changed under a held note: a dip (the voice goes on), a smaller jump than at once", ok && j1 < j0);
trk_note_off(t, 57);
{ /* (gen6e, the owner and a tester: "a sound with some release eats the steps after it") a step on a voice still in
* its release (MONO, or the same note POLY): its note starts at its sample, not let go at once */
uint32_t m, st, bb, j;
int ok2 = 1;
for (m = 0; m < 2u; m++) {
double pk[12] = {0};
ui_power_on();
song.master_q12 = 4096;
t = &trk[0];
for (k = 1; k < NTRK; k++) trk[k].p[P_MUTE] = 1;
set_engine_of(t, ENGI_ANALOG);
t->engine = t->eng_req;
t->p[P_ATK] = 0; t->p[P_DEC] = 60; t->p[P_SUS] = 100; t->p[P_REL] = 96; t->p[P_VOICE] = (int16_t)m;
t->p[P_REV] = t->p[P_DLY] = t->p[P_CHOR] = 0; t->p[P_SLEN] = 16;
for (j = 0; j < 16u; j++) {
step_t *sp = &t->step[j];
memset(sp, 0, sizeof *sp);
sp->time = ST_NOTE; sp->vel = 100; sp->n = 1; sp->note[0] = (uint8_t)(m ? 60u + (j % 4u) * 3u : 60u);
}
song.g[G_BPM] = 120;
press(B_PLAY); frames(2);
for (bb = 0; bb < (5512u / CTL) * 12u; bb++) {
events_block(CTL), mix_block(o, CTL);
st = bb / (5512u / CTL);
for (j = 0; j < 2u * CTL; j++) if (fabs((double)o[j]) > pk[st]) pk[st] = fabs((double)o[j]);
}
for (st = 4; st < 12u; st++) ok2 &= pk[st] > pk[2] * 0.5;
press(B_PLAY); frames(2);
for (bb = 0; bb < 8u; bb++) events_block(CTL), mix_block(o, CTL);
song.playing = 0; transport_req = 0;
trk_all_off(t);
}
bad += check("gen6e: REL 96, POLY (the same note) and MONO: every step as loud as the first (the release eats none)", ok2);
}
return bad;
}
/* (0.6.43) MUTATE (project.c mutate_poll): on the bar, AMOUNT 64 when turned on, never LEVEL / PAN, ORBIT near the