WIP: silence path engages (a DIST tail counts only with DIST); engine_block asks the engine's desc only for a changed value; PROFILE's SEQ in silent blocks

This commit is contained in:
Claude committed 2026-10-19 16:00:17 +00:00
1 parent bfa86eba3d
commit 0b7bd697d4
3 files changed
+15 -7

No files matched your search

+4 -3
View File
@@ -2405,7 +2405,7 @@ static __attribute__((noinline)) int mix_hush(void)
return 0;
for (k = 0; k < NPART; k++) {
const track_t *t = &trk[k];
if (t->tail || t->xf_on || t->xin)
if ((t->tail && t->p[P_DIST]) || t->xf_on || t->xin) /* (tail: counted down only with DIST, mix_part) */
return 0;
for (i = 0; i < NVOICE; i++)
if (t->v[i].active)
@@ -2413,7 +2413,7 @@ static __attribute__((noinline)) int mix_hush(void)
}
return 1;
}
static __attribute__((noinline)) void mix_silent(int32_t *out, uint32_t n)
static __attribute__((noinline)) void mix_silent(int32_t *out, uint32_t n, uint32_t t0)
{
uint32_t k;
for (k = 0; k < NPART; k++) {
@@ -2424,6 +2424,7 @@ static __attribute__((noinline)) void mix_silent(int32_t *out, uint32_t n)
mc_mask_last = 0;
prf_cur.fxrest++;
memset(out, 0, 2u * n * sizeof *out);
prf_blk[PRF_SEQ] = MC_TICKS() - t0; /* (PROFILE: the block's whole work, the events' with it) */
}
static __attribute__((noinline)) void mix_block(int32_t *out, uint32_t n) /* (0.6.71: kept out of the ISR's
@@ -2448,7 +2449,7 @@ static __attribute__((noinline)) void mix_block(int32_t *out, uint32_t n) /* (
duck_block();
perf = perf_begin(n); /* the FX hold layer at work (perform.c) */
if (!perf && mix_hush()) { /* (0.9.15) all at rest: nothing rendered (above) */
mix_silent(out, n);
mix_silent(out, n, t0);
return;
}
if (!mc_off && mc_live()) { /* (0.6.71) core 1 at its parts meanwhile; (0.6.75) and the buses */
+10 -3
View File
@@ -798,10 +798,17 @@ static void engine_block(track_t *t)
uint32_t i, any = 0;
if (!t->xf_on && t->eng_req == t->engine && !eng_kit(t->engine)) { /* a list value changed while it sounds */
const engine_t *e = ENGINES[t->engine % NENGINES];
for (i = 0; i < 8u; i++) {
const param_desc_t *d = e->desc ? e->desc(t, i) : 0;
if (t->p[P_E0 + i] != t->pe_old[i] && ((d ? d : &e->edit[i])->fmt == F_ENUM || (d ? d : &e->edit[i])->names))
for (i = 0; i < 8u; i++) { /* (0.9.15) only a value that changed, then followed (pe_old:
* the last value heard): until 0.9.15 the engine's desc for all 8
* of every part, every block, stopped too (six engines' code a
* block: on the FM-1 most of PROFILE's SEQUENCER at rest) */
const param_desc_t *d;
if (t->p[P_E0 + i] == t->pe_old[i])
continue;
d = e->desc ? e->desc(t, i) : 0;
if ((d ? d : &e->edit[i])->fmt == F_ENUM || (d ? d : &e->edit[i])->names)
break;
t->pe_old[i] = t->p[P_E0 + i];
}
for (any = 0; i < 8u && any < NVOICE; any++)
if (t->v[any].active && t->v[any].env_out)
+1 -1
View File
@@ -42,7 +42,7 @@ EVENT_PFX = ("ep0_", "e0_", "ep1_", "ep3_", "sysex_", "midi_", "um_", "uart_midi
"dxo_rec_hold", "pfx_fire", "seq_lane_rat", "sy_word", "sy_gen_word", "sy_enter", "live_",
"mod_key", "mod_note", "sing_note", "ly_", "step_parts", "step_rolls", "tie_span", "every_on", "scale_snap",
"input_on", "input_off", "fx_trip", "rev_state_clear", "scene_capture", "pfx_resync", "mc_lost", "drum_oct_note",
"sy_tok", "sy_norm", "cg_near", "fl_ok")
"sy_tok", "sy_norm", "cg_near", "fl_ok", "param_desc_of", "param_fit", "get_desc")
EVENT_KEEP = {"mo_block", "key_latch", "midi_clock_advance", "cin_block", "kb_lat", "live_q", "live_adv"}
ISR_ROOTS = ("fm1_alnk0_irq", "fm1_timer5_irq", # hal/fm1_isr.S: the audio ISR, the key / LED scan (+ USB poll),
"fm1_timer5_top") # (0.9.14) the scan's body, timed