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