README update

This commit is contained in:
zymon 2023-08-27 15:41:10 +02:00
parent ce982d34f0
commit 46e4409b06
2 changed files with 17 additions and 24 deletions

View file

@ -10,4 +10,3 @@ LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TxRxModels = "b3a66cf7-5ddc-45c2-8bf6-0600270461a1"

View file

@ -9,38 +9,32 @@
Currently, supported methods: Currently, supported methods:
* Image Source for rectangular (shoebox) rooms * Fast Image Source method for rectangular (shoebox) rooms
* Transmitter and receiver directivity pattern support
# Example # Example
```julia ```julia
using StaticArrays
using LinearAlgebra
using RoomAcoustics using RoomAcoustics
using RoomAcoustics.TxRxModels
sampling_rate = 16e3
c = 343.0 # Wave propagation velocity
c = 343.0; room = let
fs = 16000.0; L = (10.0, 5.0, 3.0)
rir_Nsamples = 4000; β = fill(0.55, 6) |> Tuple
β = 0.75; RectangularRoom(c, L, β)
room_β = (β, β, β, β, β, β); end
room_L = (10., 10., 3.);
rir_config = let
h_len = convert(Int, sampling_rate * 0.50)
ISMConfig((0, -1), sampling_rate, h_len)
end
mic = SVector{3}([5., 5., 1.]); rx = [2.2, 4.1, 1.6] |> TxRx
source = SVector{3}([1., 9., 2.]); tx = [2.2, 4.1, 1.7] |> TxRx
# Setup configuration
room = RectangularRoom(c, room_L, room_β);
rir_config = ISMConfig((0, -1), fs, rir_Nsamples, 8e-3, true, 0.0);
rx = TxRx(mic);
tx = TxRx(source);
# Compute transfer function using Image Source Method
h = ISM(rx, tx, room, rir_config);
h = ISM(tx, rx, room, rir_config)
``` ```