feat(preferences): choose MIDI devices and persistent channel defaults (phase 102)

This commit is contained in:
Johannes Findeisen 2026-11-06 02:25:28 +01:00
commit e9d0c62fd6
9 changed files with 101 additions and 17 deletions

View file

@ -21,6 +21,11 @@ static const xtc_setting_info schema[] = {
STR("plugins",vst2_paths,"VST2 search paths (colon-separated)"),
STR("plugins",vst3_paths,"VST3 search paths (colon-separated)"),
STR("plugins",ladspa_paths,"LADSPA search paths (colon-separated)"),
STR("midi",midi_input_port,"Default MIDI input source (next Play)"),
STR("midi",midi_output_port,"Default MIDI output destination (next Play)"),
NUM("midi",midi_input_channel,"Live input channel (-1 all, 0..15)",-1,15),
NUM("midi",midi_output_channel,"Output channel (-1 original, 0..15)",-1,15),
NUM("midi",midi_thru,"Forward live MIDI to output: 0 or 1",0,1),
NUM("interface",main_x,"Main window X",-32768,32768), NUM("interface",main_y,"Main window Y",-32768,32768),
NUM("interface",inspector_visible,"Track inspector visible: 0 or 1",0,1),
NUM("interface",width,"Main window width",1220,3840), NUM("interface",height,"Main window height",720,2160),
@ -77,6 +82,7 @@ void xtc_settings_defaults(xtc_settings *s)
s->mixer_x=s->mixer_y=100;s->mixer_width=1056;s->mixer_height=600;
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->midi_input_channel=s->midi_output_channel=-1;
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; }