Skip to content

Instantly share code, notes, and snippets.

@vanne02135
Created December 25, 2011 22:46
Show Gist options
  • Save vanne02135/1519894 to your computer and use it in GitHub Desktop.
Save vanne02135/1519894 to your computer and use it in GitHub Desktop.
Calculate rectangular room reverberation time according to the Neubauer et al: Prediction of the Reverberation Time in Rectangular Rooms with NonUniformly Distributed Sound Absorption, equation. 20
%% According to the http://sound.eti.pg.gda.pl/papers/prediction_of_reverberation_time.pdf, eq. 20
l = 5; % room length
w = 8; % room width
h = 5.5; % room height
alpha_w1 = 0.01; % absorption coeff for wall 1
alpha_w2 = 0.01; % absorption coeff for wall 2 .. more to follow
alpha_c = 0.3; % absorption coeff for ceiling
alpha_f = 0.5; % absoprtion coeff for floor
Sw1 = l*h;
Sw2 = w*h;
Sf = w*l;
Sc = Sf;
S = Sw1 * 2 + Sw2 * 2 + Sf + Sc;
V = l*w*h;
rho_w1 = 1 - alpha_w1;
rho_w2 = 1 - alpha_w2;
rho_c = 1 - alpha_c;
rho_f = 1 - alpha_f;
alpha_ww = (Sw1 * alpha_w1 + Sw2 * alpha_w2) / (Sw1 + Sw2);
rho_ww = 1- alpha_ww;
alpha_cf = (Sf * alpha_f + Sc * alpha_c) / (Sf + Sc);
rho_cf = 1 - alpha_cf;
alpha_total = (Sw1 * alpha_w1 *2 + Sw2 * alpha_w2 *2 + Sf * alpha_f + Sc * alpha_c) / (2*Sw1 + 2*Sw2 + Sf + Sc);
rho_total = 1 - alpha_total;
alpha_ww_star = log(1/rho_total) + (2 * rho_w1 * (rho_w1 - rho_ww)*Sw1^2 + 2 * rho_w2 * (rho_w2 - rho_ww) * Sw2^2)/(rho_total*(2*Sw1 + 2*Sw2))^2;
% NOTE: there must be an error in the paper's eq 21b with the prefix sign
% "-"
alpha_cf_star = -log(1/rho_total) + (rho_c* (rho_c - rho_cf)*Sc^2 + rho_f * (rho_f - rho_cf)* Sf^2)/(rho_cf*(Sf+Sc))^2;
T60 = .32 * V / S^2 * ( h*(l+w)/alpha_ww_star + l*w/alpha_cf_star)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment