A type that describes the acoustic characteristics of a surface.
An audio material defines how a surface absorbs and scatters sound energy across frequency bands.
Use preset materials for common real-world surfaces, or create custom materials from raw
absorption and scattering coefficients.
```swift
// Use a preset material:
let walls: Audio.Material = .concrete
// Create a custom material:
let custom = Audio.Material(
absorption: .init([0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10]),
scattering: .init([0.10, 0.09, 0.08, 0.07, 0.06, 0.05, 0.04, 0.03, 0.02, 0.01])
)
// Modify a preset material:
let thickCarpet: Audio.Material = .carpet.scalingAbsorption { frequency in
frequency > 1000 ? 0.5 : .zero
}
```
Creates a new audio material with the provided absorption data.
Example usage:
let material: Audio.Material = .concrete.absorption([500: 0.3, 1000: 0.4, 4000: 0.5])
Creates a new audio material with the provided scattering data.
Example usage:
let material: Audio.Material = .wood.scattering([500: 0.3, 1000: 0.4, 4000: 0.5])
get · iOS 27.0+
seatingHard
TypeScript
static get seatingHard(): Audio_Material
Swift declaration
static let seatingHard: Audio.Material
A material that simulates the acoustic properties of hard seating.
get · iOS 27.0+
seatingUpholstered
TypeScript
static get seatingUpholstered(): Audio_Material
Swift declaration
static let seatingUpholstered: Audio.Material
A material that simulates the acoustic properties of upholstered seating.
get · iOS 27.0+
ice
TypeScript
static get ice(): Audio_Material
Swift declaration
static let ice: Audio.Material
A material that simulates the acoustic properties of ice.
Creates an audio material from absorption and scattering data.
- Parameters:
- name: An optional name for the material.
- absorption: The absorption characteristics of the material.
- scattering: The scattering characteristics of the material.
get · iOS 27.0+
name
TypeScript
get name(): (string) | null
Swift declaration
var name: String?
The name of the audio material.
set · iOS 27.0+
name
TypeScript
set name(value: (string) | null)
Swift declaration
var name: String?
The name of the audio material.
get · iOS 27.0+
sand
TypeScript
static get sand(): Audio_Material
Swift declaration
static let sand: Audio.Material
A material that simulates the acoustic properties of sand.
get · iOS 27.0+
snow
TypeScript
static get snow(): Audio_Material
Swift declaration
static let snow: Audio.Material
A material that simulates the acoustic properties of snow.
get · iOS 27.0+
soil
TypeScript
static get soil(): Audio_Material
Swift declaration
static let soil: Audio.Material
A material that simulates the acoustic properties of soil.
get · iOS 27.0+
tile
TypeScript
static get tile(): Audio_Material
Swift declaration
static let tile: Audio.Material
A material that simulates the acoustic properties of tile.
get · iOS 27.0+
wood
TypeScript
static get wood(): Audio_Material
Swift declaration
static let wood: Audio.Material
A material that simulates the acoustic properties of wood.
get · iOS 27.0+
brick
TypeScript
static get brick(): Audio_Material
Swift declaration
static let brick: Audio.Material
A material that simulates the acoustic properties of brick.
get · iOS 27.0+
glass
TypeScript
static get glass(): Audio_Material
Swift declaration
static let glass: Audio.Material
A material that simulates the acoustic properties of glass.
get · iOS 27.0+
metal
TypeScript
static get metal(): Audio_Material
Swift declaration
static let metal: Audio.Material
A material that simulates the acoustic properties of metal.
get · iOS 27.0+
trees
TypeScript
static get trees(): Audio_Material
Swift declaration
static let trees: Audio.Material
A material that simulates the acoustic properties of trees.
get · iOS 27.0+
water
TypeScript
static get water(): Audio_Material
Swift declaration
static let water: Audio.Material
A material that simulates the acoustic properties of water.
get · iOS 27.0+
carpet
TypeScript
static get carpet(): Audio_Material
Swift declaration
static let carpet: Audio.Material
A material that simulates the acoustic properties of carpet.
get · iOS 27.0+
gravel
TypeScript
static get gravel(): Audio_Material
Swift declaration
static let gravel: Audio.Material
A material that simulates the acoustic properties of gravel.
get · iOS 27.0+
marble
TypeScript
static get marble(): Audio_Material
Swift declaration
static let marble: Audio.Material
A material that simulates the acoustic properties of marble.
get · iOS 27.0+
curtain
TypeScript
static get curtain(): Audio_Material
Swift declaration
static let curtain: Audio.Material
A material that simulates the acoustic properties of a curtain.
get · iOS 27.0+
default
TypeScript
static get default(): Audio_Material
Swift declaration
static let `default`: Audio.Material
Default audio material.
get · iOS 27.0+
dryWall
TypeScript
static get dryWall(): Audio_Material
Swift declaration
static let dryWall: Audio.Material
A material that simulates the acoustic properties of drywall.
get · iOS 27.0+
parquet
TypeScript
static get parquet(): Audio_Material
Swift declaration
static let parquet: Audio.Material
A material that simulates the acoustic properties of parquet flooring.
get · iOS 27.0+
plaster
TypeScript
static get plaster(): Audio_Material
Swift declaration
static let plaster: Audio.Material
A material that simulates the acoustic properties of plaster.
get · iOS 27.0+
concrete
TypeScript
static get concrete(): Audio_Material
Swift declaration
static let concrete: Audio.Material
A material that simulates the acoustic properties of concrete.
get · iOS 27.0+
mattress
TypeScript
static get mattress(): Audio_Material
Swift declaration
static let mattress: Audio.Material
A material that simulates the acoustic properties of a mattress.
Skipped declarations
2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.