function P = recorder_defaults() % RECORDER_DEFAULTS Default parameters, mirroring the web app's params.ts. % A soprano (descant) recorder in C. The output duration is not a parameter: % it is note_count * note_dur_s + (note_count - 1) * gap_ms + tail_s. % Bore (window at x = 0, open foot at x = bore_length_m) P.bore_length_m = 0.3015; P.bore_r_head_m = 0.0067; P.bore_r_foot_m = 0.0052; P.wall_m = 0.003; P.hole_scale = 1.0; P.thumb_pinch = 0.35; P.pinch_loss = 0.5; % Window, windway, and jet P.cutup_m = 0.0045; % flue exit to labium (window length along the bore) P.window_width_m = 0.010; P.flue_h_m = 0.0010; % flue exit height P.flue_w_m = 0.010; % flue exit width P.labium_offset_m = 0.0004; P.jet_gain = 1.0; % receptivity trim P.jet_growth = 0.4; % instability growth per flue height of travel P.jet_conv = 0.55; % jet wave speed as a fraction of Uj P.jet_stcut = 0.45; % jet instability cutoff, Strouhal-like: f_c = jet_stcut Uj / W P.vortex_loss = 1.0; % nonlinear mouth loss coefficient P.noise_level = 0.03; % turbulence displacement noise on the jet P.direct_gain = 1.0; % Breath and gesture P.breath_pa = 350.0; % blowing pressure for C5; higher notes track up P.breath_track = 1.6; % pressure grows as (f_note / 523.25)^breath_track P.attack_ms = 12.0; P.release_ms = 25.0; P.vibrato_hz = 5.0; P.vibrato_depth = 0.0; P.note_count = 1; % 1..3 P.note1 = 5; % index into the fingering chart: 5 = G5 P.note2 = 6; % A5 P.note3 = 7; % B5 P.note_dur_s = 1.6; P.gap_ms = 60.0; P.seed = 1; % Modal fit P.max_mode_hz = 10000.0; P.max_modes = 12; P.grid_hz = 2.5; % Radiation / listener (window at the origin, foot along -y, holes toward +z) P.listener_x_m = 0.25; P.listener_y_m = -0.10; P.listener_z_m = 0.35; P.speed_of_sound = 343.0; P.air_density = 1.204; % Rendering / output P.sample_rate = 48000; P.oversample = 2; P.tail_s = 0.4; P.pre_delay_ms = 3.0; P.normalize = 1; P.peak_dbfs = -3.0; P.full_scale_pa = 0.5; end