feat: render bounded effect tails and reset internal history on transport changes

This commit is contained in:
Johannes Findeisen 2026-11-05 23:55:56 +01:00
commit 836cdedc6b
22 changed files with 284 additions and 18 deletions

View file

@ -38,6 +38,8 @@ static const xtc_setting_info schema[] = {
NUM("project_defaults",sustain_cc,"New project sustain CC (128 disables)",0,128),
NUM("transport",loop_start,"Loop start, ticks",0,38399999), NUM("transport",loop_end,"Loop end, ticks",1,38400000),
NUM("transport",loop_enabled,"Loop enabled: 0 or 1",0,1),
NUM("transport",tail_ms,"Playback/export tail, ms",0,60000),
NUM("transport",stop_after_tail,"Stop playback after song and tail: 0 or 1",0,1),
NUM("transport",follow_playhead,"Follow playhead: 0 or 1",0,1)
};
#define COUNT (sizeof(schema)/sizeof(schema[0]))
@ -54,7 +56,7 @@ void xtc_settings_defaults(xtc_settings *s)
s->width=1280; s->height=800; s->piano_width=900; s->piano_height=620; s->refresh_ms=100;
s->sequencer_snap=s->piano_snap=240; s->sequencer_zoom=48; s->clip_ticks=3840; s->note_ticks=960;
s->note_velocity=100; s->filter_channel=-1; s->filter_high=127; s->tempo=120000;
s->volume_cc=7; s->pan_cc=10; s->sustain_cc=64; s->loop_end=3840;
s->volume_cc=7; s->pan_cc=10; s->sustain_cc=64; s->loop_end=3840;s->tail_ms=3000;
}
static int snap(int64_t v) { return v==1 || v==120 || v==160 || v==240 || v==320 || v==480 || v==960 || v==1920 || v==3840; }
xtc_result xtc_settings_validate(const xtc_settings *s)