Basics - Moosevellous/Trace GitHub Wiki
Go to... |
---|
Arithmetic Sum Average Logarithmics SPLSUM SPLAV SPLMINUS Conditionals SPLSUMIF SPLAVIF |
Building Acoustics Composite TL Mass-Air-Mass Mass law Room to room TL Inside to Outside Diffusivity Correction, Cd |
Misc. Fan Speed Correction Frequency Band Cutoff Speed of Sound Wavelength |
Many buttons in the Basics group call the same form, which looks like this:
The form applies the formulas to the correct ranges of cells, depending on sheet type and applies styles if checkbox is selected.
Linear sum of input ranges, very useful for adding losses and gains.
Linear average of input ranges. It's a valid assumption when the distribution of the values isn't logarithmic.
Inserts formulas for logarithmic addition of values using the formula:
SPLSUM=10*LOG(10^(SPL1/10) + 10^(SPL2/10) + 10(SPL3/10) ....)
Public Function SPLSUM(ParamArray rng1() As Variant) As Variant
Inserts formulas for logarithmic average of values using the formula:
SPLAV=10*LOG(10^(SPL1/10) + 10^(SPL2/10) + 10(SPL3/10) ....)-10*LOG(n)
where n=number of samples
Public Function SPLAV(ParamArray rng1() As Variant) As Variant
Inserts formulas for logarithmic subtraction of values using the formula:
SPLMINUS=10*LOG(10^(SPL1/10) - 10^(SPL2/10))
Public Function SPLMINUS(SPLtotal As Double, SPL2 As Double) As Variant
Note that only two values are accepted for SPLMINUS
, as opposed to SPLSUM
and SPLAV
, which accept Range inputs.
The funcitons SPLSUMIF
and SPLAVIF
use conditional operators contained in a string to determine if the numbers should be included in the set of values.
Symbol | Operator |
---|---|
"=" | Equals |
">=" | Greater Than or Equal To |
"<=" | Less Than or Equal To |
">" | Greater Than |
"<" | Less Than |
"*[wildcard]*" | Wildcard matching |
Note that Wildcard uses the VBA function InStr to find [wildcard] in the cell.
Logarithmically adds the cells from SumRange if the Condition is met (see Conditionals). Uses SumRange unless ConditionRange is provided.
Function SPLSUMIF(SumRange As Range, Condition As String, Optional ConditionRange As Variant)
Logarithmically averages the cells from SumRange if the Condition is met (see Conditionals). Uses SumRange unless ConditionRange is provided.
Function SPLAVIF(SumRange As Range, ConditionStr As String, Optional ConditionRange As Variant)
Calculates the transmission loss of a combined system, by weighting the performances against their areas.
Function CompositeTL(TL_Range As Range, AreaRange As Range) As Variant
Calculates the mass-air-mass resonance of a two leaf system, based on the surface density of the leaves and the cavity spacing.
Function MassAirMass(m1 As Double, m2 As Double, CavitySpace As Double, Optional vAirTemp As Variant)
The mass law line, which sets the upper limit for the transmission loss of a partition based on it's surface density.
MassLaw = (20 * Application.WorksheetFunction.Log10(freq * SurfaceDensity) - 48)
Builds a calculation for transmission of sound from one room to another. Requires 9 lines of free space.
Builds a calculation for transmission of sound from one room to another. Requires 6 lines of free space. [Back to top]
This is a term defined as part of ISO 12354-4. The definitions state:
From ISO 12354-4 Table B1: Indication of the diffusivity term for different rooms
Cd=-6dB for Relatively small uniformly shaped rooms (diffuse field); in front of reflecting surface
Cd=-3dB for Relatively small uniformly shaped rooms (diffuse field); in front of absorbing surface
Cd=-5dB for Large flat or long halls, many sources (average industrial building); in front of reflecting surface
Cd=-3dB for Industrial building, few dominating directional sources; in front of reflecting surface
Cd=0dB for Industrial building, few dominating directional sources; in front of absorbing surface
Calculates the wavelength of the centre frequencies, based on the speed of sound and frequency in Hz.
Function GetWavelength(fstr As String, SoundSpeed As Long)
Calculates the speed of sound in air, based on the temperature (temp) in Celcius or Kelvin.
Function GetSpeedOfSound(temp As Long, Optional IsKelvin As Boolean)
Included as a part of the Wavelength function, not for each octave band. Function assumes the following values:
Parameter | Value |
---|---|
Gamma | 1.4 |
R | 287.1848 |
Calculates the frequency band cutoff values for octave and third octave filters according to ANSI S1.11
Function FrequencyBandCutoff(freq As String, Mode As String, Optional bandwidth As Double, Optional baseTen As Boolean)
This is the frequency where the filter crosses over the filter in the adjacent band. Sound energy measured at this frequency will be evenly distributed between the two filters.
Symbol | Operator | Formula |
---|---|---|
"upper" | Less than | fm * G ^ (1 / (2 * bandwidth)) |
"lower" | Greater than or equal to | fm * G ^ (-1 / (2 * bandwidth)) |