function P = triangle_defaults() % TRIANGLE_DEFAULTS Default parameters, mirroring the web app's params.ts. % The output duration is not a parameter: it is % (strike_count - 1) / strike_rate_hz + tail_s. % Rod geometry (equilateral, open at the bottom-left corner) P.side_length_m = 0.152; P.gap_m = 0.015; P.rod_diameter_m = 0.008; % Rod material (steel) P.density = 7850.0; P.youngs_modulus = 2.0e11; P.poisson_ratio = 0.30; P.stiffness_trim = 1.00; % Discretization / mode retention P.n_elements = 60; P.min_mode_hz = 20.0; P.max_mode_hz = 22000.0; % Damping P.loss_factor = 6.0e-5; P.loss_slope = 4.0e-10; P.radiation_loss = 1.0; % Beater (steel rod tip) P.beater_radius_m = 0.0045; P.beater_mass_kg = 0.022; P.beater_youngs = 2.0e11; P.restitution = 0.60; % Strike / roll gesture P.strike_velocity = 1.5; P.strike_pos = 0.17; % arclength fraction: middle of the base P.strike_angle_deg = 20.0; % 0 = in the plane of the triangle, 90 = normal to it P.strike_count = 12; P.strike_rate_hz = 12.0; P.roll_pos2 = 0.40; % second contact point of a roll (the right leg) P.timing_jitter_ms = 6.0; P.velocity_spread = 0.15; P.seed = 1; % Radiation / listener P.direct_gain = 1.0; P.listener_x_m = 0.20; P.listener_y_m = 0.10; P.listener_z_m = 0.40; P.speed_of_sound = 343.0; P.air_density = 1.204; % Rendering / output P.sample_rate = 48000; P.oversample = 2; P.tail_s = 5.0; P.pre_delay_ms = 3.0; P.normalize = 1; P.peak_dbfs = -3.0; P.full_scale_pa = 2.0; end