function P = bass_defaults() % BASS_DEFAULTS Default parameters, mirroring the web app's params.ts. % The output duration is not a parameter: it is % (note_count - 1) * 60 / tempo_bpm + tail_s. % Strings (1 = G2, 2 = D2, 3 = A1, 4 = E1), a 3/4-size double bass. % Linear density is not a parameter: it follows from the tension and the % open pitch, mu = T / (2 L f0)^2, which lands on realistic values % (about 7 g/m for the G string, 42 g/m for the E). P.scale_length_m = 1.04; P.tension_g_n = 285.0; P.tension_d_n = 290.0; P.tension_a_n = 300.0; P.tension_e_n = 310.0; P.inharmonicity = 8.0e-5; % B of the open string: f_n ~ n f0 sqrt(1 + B n^2) P.tuning_trim = 1.0; % overall pitch trim (1 = standard orchestral tuning) % String damping P.loss_factor = 1.6e-3; % frequency-independent internal loss P.loss_slope = 4.0e-7; % extra high-frequency loss, s P.finger_loss = 6.0e-3; % extra loss factor on stopped notes (finger termination) P.residual_y = 0.015; % residual bridge conductance above the retained body modes, s/kg % Body (see bass_body.m for the mode table these trims act on) P.a0_hz = 58.5; % f-hole Helmholtz resonance P.body_trim = 1.0; % scales the corpus mode frequencies P.body_q_scale = 1.2; % scales the body mode Qs P.bridge_mobility = 1.0; % scales the body admittance seen at the bridge (1/masses) P.rad_area_scale = 1.0; % scales the radiating areas of the body modes P.dipole_length_m = 0.45; % effective front-to-back path of the corpus dipoles P.radiation_loss = 1.0; % scales the radiation damping added to the body Qs % Pluck P.pluck_force_n = 15.0; % transverse pull at release P.pluck_pos = 0.38; % fraction of the vibrating length, measured from the bridge P.finger_release_ms = 2.6; % finite release time of the fingertip (spectral rolloff) P.choke_ms = 45.0; % decay time constant applied when the next note lands % Gesture P.root_midi = 33; % A1; the single note, and the key of a walking line P.note_count = 1; P.tempo_bpm = 96.0; P.force_spread = 0.20; % lognormal spread of the pluck force across a line P.timing_jitter_ms = 4.0; P.seed = 1; % Radiation / listener (origin at the bridge, +y up the neck, +z out of the top plate) P.direct_gain = 0.7; P.listener_x_m = 0.50; P.listener_y_m = 0.30; P.listener_z_m = 1.20; P.speed_of_sound = 343.0; P.air_density = 1.204; % Rendering / output P.max_mode_hz = 3000.0; P.sample_rate = 48000; P.oversample = 2; P.tail_s = 8.0; P.pre_delay_ms = 3.0; P.normalize = 1; P.peak_dbfs = -3.0; P.full_scale_pa = 2.0; end