HammeriteAudioMaterial
Audio. Inherits Resource
What one material does to sound: a row of HammeriteAudioMaterials.
The coefficients are real-world acoustics simplified for a game. Only acoustic_category is read today - by the bake, to decide what a room built of this should sound like; the rest are authored and carried but applied to nothing yet, the way HammeriteAudioPreset's absorption fields are.
Properties
| Type | Name | Default |
|---|---|---|
String | material_name | "" |
int | acoustic_category | 0 |
float | reverb | 0.5 |
float | absorption | 0.5 |
float | transmission_loss | 20.0 |
float | freq_bias | 0.5 |
Color | debug_color | Color(0.74509805, 0.74509805, 0.74509805, 1) |
Enumerations
enum Category
| Value | Name | Description |
|---|---|---|
0 | UNSPECIFIED | Has no say in what a room sounds like. What a material of a kind Hammerite does not model is. |
1 | MASONRY | Stone, brick, concrete, plaster: hard, heavy, and what a room of nothing else is taken for. |
2 | WOOD | Boards and beams. |
3 | METAL | Sheet and plate, which ring. |
4 | FABRIC | Cloth, carpet, leather: soft, and the one family that kills a room. |
5 | TILE | Tile and glass: hard and thin, brighter than masonry. |
6 | EARTH | Dirt, sand, grass - and so a cave, which is the room that gets. |
Property descriptions
material_name
var material_name: String = ""
What this material is called. HammeriteAudioMaterials.add_material() files it under this name in lower case, and it is the name HammeriteAudioRuntime.material_name_for() answers with.
acoustic_category
var acoustic_category: int = 0
Which family of surface a room of this sounds like, which is the whole of what the bake asks of a material: a room mostly Category.WOOD gets a wooden room's reverb. A family rather than the coefficients below because reverb here is a preset, chosen, not a decay computed from absorptions - so what the bake needs is which preset, and a material of a kind it has never heard of should have no say rather than a wrong one. That is what Category.UNSPECIFIED is for.
reverb
var reverb: float = 0.5
Reverb contribution: 0 absorptive, like carpet; 1 reflective, like marble.
absorption
var absorption: float = 0.5
How much sound energy this absorbs rather than reflecting: 0 perfectly reflective, 1 perfectly absorptive.
transmission_loss
var transmission_loss: float = 20.0
How much quieter a sound is for having passed through this, in decibels. Cloth or thin wood is 5-15, a standard wall 15-25, a heavy one 25-40, and thicker than that more.
freq_bias
var freq_bias: float = 0.5
Which end of the spectrum suffers: 0 absorbs highs and passes lows, as something dense does, 0.5 is even, and 1 absorbs lows and passes highs, as something thin does.
debug_color
var debug_color: Color = Color(0.74509805, 0.74509805, 0.74509805, 1)
What colour to draw this in a debug view.