/ simulated_instruments / woodblock
Sign in
simulated_instruments / woodblock
woodblock / matlab / woodblock_defaults.m
54 lines · 1.2 KBCodeBlameHistory
c5866daReimplement the algorithm in MATLAB syntax, run it with numblJeremy Magland 1function P = woodblock_defaults()
2% WOODBLOCK_DEFAULTS Default parameters, mirroring the web app's params.ts.
3% Note woodblock.py's reference default for mallet_stiffness is 3.0e8; the
4% app (and this file) default to a softer 1.0e8.
6P.length_m = 0.200;
7P.width_m = 0.055;
8P.wall_thickness_m = 0.010;
9P.block_height_m = 0.050;
11P.density = 850.0;
12P.youngs_modulus = 1.6e10;
13P.hollow_softening = 0.90;
14P.participating_mass_kg = 0.35;
15P.inharmonicity = 1.00;
16P.n_modes = 26;
17P.max_mode_hz = 20000.0;
19P.loss_factor = 0.010;
20P.loss_slope = 1.2e-7;
22P.strike_position = 0.42;
23P.mallet_mass = 0.025;
24P.mallet_velocity = 2.5;
25P.mallet_stiffness = 1.0e8;
26P.contact_exponent = 1.5;
27P.contact_damping = 0.8;
29P.cavity_volume_m3 = 2.6e-4;
30P.slit_area_m2 = 8.0e-4;
31P.slit_length_m = 0.012;
32P.cavity_damping = 0.06;
33P.cavity_coupling = 1.0;
34P.cavity_span_lo = 0.30;
35P.cavity_span_hi = 0.70;
37P.listener_x_m = 0.15;
38P.listener_y_m = 0.25;
39P.listener_z_m = 0.30;
40P.slit_x_m = 0.0;
41P.slit_y_m = 0.0275;
42P.slit_z_m = 0.0;
43P.radiating_elements = 48;
44P.speed_of_sound = 343.0;
45P.air_density = 1.204;
47P.sample_rate = 48000;
48P.oversample = 16;
49P.duration_s = 0.45;
50P.pre_delay_ms = 3.0;
51P.normalize = 1;
52P.peak_dbfs = -3.0;
53P.full_scale_pa = 20.0;
54end
↑↓ move↵openescclose