Skip to main content

fmod/reverb3d/
presets.rs

1use num_derive::FromPrimitive;
2
3use super::Properties;
4
5macro_rules! impl_presets {
6  ( $($variant:ident => $const:ident)+
7  ) => {
8    #[derive(Copy, Clone, Debug, Eq, PartialEq, FromPrimitive)]
9    pub enum Presets {
10      $($variant,)+
11      MAX
12    }
13
14    impl From <Presets> for Properties {
15      fn from (preset : Presets) -> Properties {
16        match preset {
17          $(
18          Presets::$variant => $const,
19          )+
20          Presets::MAX => unreachable!()
21        }
22      }
23    }
24  }
25}
26
27impl_presets!{
28  Off              => OFF
29  Generic          => GENERIC
30  Paddedcell       => PADDEDCELL
31  Room             => ROOM
32  Bathroom         => BATHROOM
33  Livingroom       => LIVINGROOM
34  Stoneroom        => STONEROOM
35  Auditorium       => AUDITORIUM
36  Concerthall      => CONCERTHALL
37  Cave             => CAVE
38  Arena            => ARENA
39  Hangar           => HANGAR
40  Carpettedhallway => CARPETTEDHALLWAY
41  Hallway          => HALLWAY
42  Stonecorridor    => STONECORRIDOR
43  Alley            => ALLEY
44  Forest           => FOREST
45  City             => CITY
46  Mountains        => MOUNTAINS
47  Quarry           => QUARRY
48  Plain            => PLAIN
49  Parkinglot       => PARKINGLOT
50  Sewerpipe        => SEWERPIPE
51  Underwater       => UNDERWATER
52}
53
54/// Off / disabled
55pub const OFF : Properties = Properties {
56  decay_time:          1000.0,
57  early_delay:         7.0,
58  late_delay:          11.0,
59  hf_reference:        5000.0,
60  hf_decay_ratio:      100.0,
61  diffusion:           100.0,
62  density:             100.0,
63  low_shelf_frequency: 250.0,
64  low_shelf_gain:      0.0,
65  high_cut:            20.0,
66  early_late_mix:      96.0,
67  wet_level:           -80.0
68};
69
70/// Generic / default
71pub const GENERIC : Properties = Properties {
72  decay_time:          1500.0,
73  early_delay:         7.0,
74  late_delay:          11.0,
75  hf_reference:        5000.0,
76  hf_decay_ratio:      83.0,
77  diffusion:           100.0,
78  density:             100.0,
79  low_shelf_frequency: 250.0,
80  low_shelf_gain:      0.0,
81  high_cut:            14500.0,
82  early_late_mix:      96.0,
83  wet_level:           -8.0
84};
85
86pub const PADDEDCELL : Properties = Properties {
87  decay_time:          170.0,
88  early_delay:         1.0,
89  late_delay:          2.0,
90  hf_reference:        5000.0,
91  hf_decay_ratio:      10.0,
92  diffusion:           100.0,
93  density:             100.0,
94  low_shelf_frequency: 250.0,
95  low_shelf_gain:      0.0,
96  high_cut:            160.0,
97  early_late_mix:      84.0,
98  wet_level:           -7.8
99};
100
101pub const ROOM : Properties = Properties {
102  decay_time:          400.0,
103  early_delay:         2.0,
104  late_delay:          3.0,
105  hf_reference:        5000.0,
106  hf_decay_ratio:      83.0,
107  diffusion:           100.0,
108  density:             100.0,
109  low_shelf_frequency: 250.0,
110  low_shelf_gain:      0.0,
111  high_cut:            6050.0,
112  early_late_mix:      88.0,
113  wet_level:           -9.4
114};
115
116pub const BATHROOM : Properties = Properties {
117  decay_time:          1500.0,
118  early_delay:         7.0,
119  late_delay:          11.0,
120  hf_reference:        5000.0,
121  hf_decay_ratio:      54.0,
122  diffusion:           100.0,
123  density:             60.0,
124  low_shelf_frequency: 250.0,
125  low_shelf_gain:      0.0,
126  high_cut:            2900.0,
127  early_late_mix:      83.0,
128  wet_level:           0.5
129};
130
131pub const LIVINGROOM : Properties = Properties {
132  decay_time:          500.0,
133  early_delay:         3.0,
134  late_delay:          4.0,
135  hf_reference:        5000.0,
136  hf_decay_ratio:      10.0,
137  diffusion:           100.0,
138  density:             100.0,
139  low_shelf_frequency: 250.0,
140  low_shelf_gain:      0.0,
141  high_cut:            160.0,
142  early_late_mix:      58.0,
143  wet_level:           -19.0
144};
145
146pub const STONEROOM : Properties = Properties {
147  decay_time:          2300.0,
148  early_delay:         12.0,
149  late_delay:          17.0,
150  hf_reference:        5000.0,
151  hf_decay_ratio:      64.0,
152  diffusion:           100.0,
153  density:             100.0,
154  low_shelf_frequency: 250.0,
155  low_shelf_gain:      0.0,
156  high_cut:            7800.0,
157  early_late_mix:      71.0,
158  wet_level:           -8.5
159};
160
161pub const AUDITORIUM : Properties = Properties {
162  decay_time:          4300.0,
163  early_delay:         20.0,
164  late_delay:          30.0,
165  hf_reference:        5000.0,
166  hf_decay_ratio:      59.0,
167  diffusion:           100.0,
168  density:             100.0,
169  low_shelf_frequency: 250.0,
170  low_shelf_gain:      0.0,
171  high_cut:            5850.0,
172  early_late_mix:      64.0,
173  wet_level:           -11.7
174};
175
176pub const CONCERTHALL : Properties = Properties {
177  decay_time:          3900.0,
178  early_delay:         20.0,
179  late_delay:          29.0,
180  hf_reference:        5000.0,
181  hf_decay_ratio:      70.0,
182  diffusion:           100.0,
183  density:             100.0,
184  low_shelf_frequency: 250.0,
185  low_shelf_gain:      0.0,
186  high_cut:            5650.0,
187  early_late_mix:      80.0,
188  wet_level:           -9.8
189};
190
191pub const CAVE : Properties = Properties {
192  decay_time:          2900.0,
193  early_delay:         15.0,
194  late_delay:          22.0,
195  hf_reference:        5000.0,
196  hf_decay_ratio:      100.0,
197  diffusion:           100.0,
198  density:             100.0,
199  low_shelf_frequency: 250.0,
200  low_shelf_gain:      0.0,
201  high_cut:            20000.0,
202  early_late_mix:      59.0,
203  wet_level:           -11.3
204};
205
206pub const ARENA : Properties = Properties {
207  decay_time:          7200.0,
208  early_delay:         20.0,
209  late_delay:          30.0,
210  hf_reference:        5000.0,
211  hf_decay_ratio:      33.0,
212  diffusion:           100.0,
213  density:             100.0,
214  low_shelf_frequency: 250.0,
215  low_shelf_gain:      0.0,
216  high_cut:            4500.0,
217  early_late_mix:      80.0,
218  wet_level:           -9.6
219};
220
221pub const HANGAR : Properties = Properties {
222  decay_time:          10000.0,
223  early_delay:         20.0,
224  late_delay:          30.0,
225  hf_reference:        5000.0,
226  hf_decay_ratio:      23.0,
227  diffusion:           100.0,
228  density:             100.0,
229  low_shelf_frequency: 250.0,
230  low_shelf_gain:      0.0,
231  high_cut:            3400.0,
232  early_late_mix:      72.0,
233  wet_level:           -7.4
234};
235
236pub const CARPETTEDHALLWAY : Properties = Properties {
237  decay_time:          300.0,
238  early_delay:         2.0,
239  late_delay:          30.0,
240  hf_reference:        5000.0,
241  hf_decay_ratio:      10.0,
242  diffusion:           100.0,
243  density:             100.0,
244  low_shelf_frequency: 250.0,
245  low_shelf_gain:      0.0,
246  high_cut:            500.0,
247  early_late_mix:      56.0,
248  wet_level:           -24.0
249};
250
251pub const HALLWAY : Properties = Properties {
252  decay_time:          1500.0,
253  early_delay:         7.0,
254  late_delay:          11.0,
255  hf_reference:        5000.0,
256  hf_decay_ratio:      59.0,
257  diffusion:           100.0,
258  density:             100.0,
259  low_shelf_frequency: 250.0,
260  low_shelf_gain:      0.0,
261  high_cut:            7800.0,
262  early_late_mix:      87.0,
263  wet_level:           -5.5
264};
265
266pub const STONECORRIDOR : Properties = Properties {
267  decay_time:          270.0,
268  early_delay:         13.0,
269  late_delay:          20.0,
270  hf_reference:        5000.0,
271  hf_decay_ratio:      79.0,
272  diffusion:           100.0,
273  density:             100.0,
274  low_shelf_frequency: 250.0,
275  low_shelf_gain:      0.0,
276  high_cut:            9000.0,
277  early_late_mix:      86.0,
278  wet_level:           -6.0
279};
280
281pub const ALLEY : Properties = Properties {
282  decay_time:          1500.0,
283  early_delay:         7.0,
284  late_delay:          11.0,
285  hf_reference:        5000.0,
286  hf_decay_ratio:      86.0,
287  diffusion:           100.0,
288  density:             100.0,
289  low_shelf_frequency: 250.0,
290  low_shelf_gain:      0.0,
291  high_cut:            8300.0,
292  early_late_mix:      80.0,
293  wet_level:           -9.8
294};
295
296pub const FOREST : Properties = Properties {
297  decay_time:          1500.0,
298  early_delay:         162.0,
299  late_delay:          88.0,
300  hf_reference:        5000.0,
301  hf_decay_ratio:      54.0,
302  diffusion:           79.0,
303  density:             100.0,
304  low_shelf_frequency: 250.0,
305  low_shelf_gain:      0.0,
306  high_cut:            760.0,
307  early_late_mix:      94.0,
308  wet_level:           -12.3
309};
310
311pub const CITY : Properties = Properties {
312  decay_time:          1500.0,
313  early_delay:         7.0,
314  late_delay:          11.0,
315  hf_reference:        5000.0,
316  hf_decay_ratio:      67.0,
317  diffusion:           50.0,
318  density:             100.0,
319  low_shelf_frequency: 250.0,
320  low_shelf_gain:      0.0,
321  high_cut:            4050.0,
322  early_late_mix:      66.0,
323  wet_level:           -26.0
324};
325
326pub const MOUNTAINS : Properties = Properties {
327  decay_time:          1500.0,
328  early_delay:         300.0,
329  late_delay:          100.0,
330  hf_reference:        5000.0,
331  hf_decay_ratio:      21.0,
332  diffusion:           27.0,
333  density:             100.0,
334  low_shelf_frequency: 250.0,
335  low_shelf_gain:      0.0,
336  high_cut:            1220.0,
337  early_late_mix:      82.0,
338  wet_level:           -24.0
339};
340
341pub const QUARRY : Properties = Properties {
342  decay_time:          1500.0,
343  early_delay:         61.0,
344  late_delay:          25.0,
345  hf_reference:        5000.0,
346  hf_decay_ratio:      83.0,
347  diffusion:           100.0,
348  density:             100.0,
349  low_shelf_frequency: 250.0,
350  low_shelf_gain:      0.0,
351  high_cut:            3400.0,
352  early_late_mix:      100.0,
353  wet_level:           -5.0
354};
355
356pub const PLAIN : Properties = Properties {
357  decay_time:          1500.0,
358  early_delay:         179.0,
359  late_delay:          100.0,
360  hf_reference:        5000.0,
361  hf_decay_ratio:      50.0,
362  diffusion:           21.0,
363  density:             100.0,
364  low_shelf_frequency: 250.0,
365  low_shelf_gain:      0.0,
366  high_cut:            1670.0,
367  early_late_mix:      65.0,
368  wet_level:           -28.0
369};
370
371pub const PARKINGLOT : Properties = Properties {
372  decay_time:          1700.0,
373  early_delay:         8.0,
374  late_delay:          12.0,
375  hf_reference:        5000.0,
376  hf_decay_ratio:      100.0,
377  diffusion:           100.0,
378  density:             100.0,
379  low_shelf_frequency: 250.0,
380  low_shelf_gain:      0.0,
381  high_cut:            20000.0,
382  early_late_mix:      56.0,
383  wet_level:           -19.5
384};
385
386pub const SEWERPIPE : Properties = Properties {
387  decay_time:          2800.0,
388  early_delay:         14.0,
389  late_delay:          21.0,
390  hf_reference:        5000.0,
391  hf_decay_ratio:      14.0,
392  diffusion:           80.0,
393  density:             60.0,
394  low_shelf_frequency: 250.0,
395  low_shelf_gain:      0.0,
396  high_cut:            3400.0,
397  early_late_mix:      66.0,
398  wet_level:           1.2
399};
400
401pub const UNDERWATER : Properties = Properties {
402  decay_time:          1500.0,
403  early_delay:         7.0,
404  late_delay:          11.0,
405  hf_reference:        5000.0,
406  hf_decay_ratio:      10.0,
407  diffusion:           100.0,
408  density:             100.0,
409  low_shelf_frequency: 250.0,
410  low_shelf_gain:      0.0,
411  high_cut:            500.0,
412  early_late_mix:      92.0,
413  wet_level:           7.0
414};