Class: FMOD::Core::Reverb
- Defined in:
- lib/fmod/core/reverb.rb
Overview
Structure defining a reverb environment.
Instance Attribute Summary collapse
-
#decay_time ⇒ Object
Reverberation decay time (ms).
-
#density ⇒ Float
The modal density in the late reverberation decay (%).
-
#diffusion ⇒ Float
The echo density in the late reverberation decay (%).
-
#early_delay ⇒ Float
Initial reflection delay time (ms).
-
#early_late_mix ⇒ Float
Early reflections level relative to room effect (%).
-
#hf_decay_ratio ⇒ Float
High-frequency to mid-frequency decay time ratio (%).
-
#hf_reference ⇒ Float
Reference high frequency (Hz).
-
#high_cut ⇒ Float
Relative room effect level at high frequencies (Hz).
-
#late_delay ⇒ Float
Late reverberation delay time relative to initial reflection (ms).
-
#low_shelf_freq ⇒ Float
Reference low frequency (Hz).
-
#low_shelf_gain ⇒ Float
Relative room effect level at low frequencies (dB).
-
#wet_level ⇒ Float
Room effect level at mid frequencies (dB).
Class Method Summary collapse
-
.alley ⇒ Reverb
An alley environment.
-
.arena ⇒ Reverb
An arena environment.
-
.auditorium ⇒ Reverb
An auditorium environment.
-
.bathroom ⇒ Reverb
A bathroom environment.
-
.carpeted_hallway ⇒ Reverb
A carpeted hallway environment.
-
.cave ⇒ Reverb
A cave environment.
-
.city ⇒ Reverb
A city environment.
-
.concert_hall ⇒ Reverb
A concert hall environment.
-
.forest ⇒ Reverb
A forest environment.
-
.from_index(index) ⇒ Reverb
Returns a pre-mad Reverb preset from the specified ReverbIndex.
-
.generic ⇒ Reverb
A generic reverb environment.
-
.hallway ⇒ Reverb
A hallway environment.
-
.hangar ⇒ Reverb
A hangar environment.
-
.living_room ⇒ Reverb
A living room environment.
-
.mountains ⇒ Reverb
A mountain environment.
-
.off ⇒ Reverb
No reverberation.
-
.padded_cell ⇒ Reverb
A padded cell environment.
-
.parking_lot ⇒ Reverb
A parking lot environment.
-
.plain ⇒ Reverb
A plain environment.
-
.quarry ⇒ Reverb
A quarry environment.
-
.room ⇒ Reverb
A room environment.
-
.sewer_pipe ⇒ Reverb
A sewer-pipe environment.
-
.stone_corridor ⇒ Reverb
A stone corridor environment.
-
.stone_room ⇒ Reverb
A stone room environment.
-
.underwater ⇒ Reverb
An underwater environment.
Instance Method Summary collapse
-
#initialize(address = nil) ⇒ Reverb
constructor
A new instance of Reverb.
Methods inherited from Structure
Constructor Details
#initialize(address = nil) ⇒ Reverb
Returns a new instance of Reverb.
15 16 17 18 19 20 21 |
# File 'lib/fmod/core/reverb.rb', line 15 def initialize(address = nil) types = Array.new(12, TYPE_FLOAT) members = [:decay_time, :early_delay, :late_delay, :hf_reference, :hf_decay_ratio, :diffusion, :density, :low_shelf_freq, :low_shelf_gain, :high_cut, :early_late_mix, :wet_level] super(address, types, members) end |
Instance Attribute Details
#decay_time ⇒ Object
Reverberation decay time (ms).
-
Minimum: 0.0
-
Maximum: 20000.0
-
Default: 1500.0
34 35 36 |
# File 'lib/fmod/core/reverb.rb', line 34 def decay_time=(value) self[:decay_time] = value.clamp(0.0, 20000.0) end |
#density ⇒ Float
The modal density in the late reverberation decay (%).
-
Minimum: 0.0
-
Maximum: 100.0
-
Default: 100.0
94 95 96 |
# File 'lib/fmod/core/reverb.rb', line 94 def density=(value) self[:density] = value.clamp(0.0, 100.0) end |
#diffusion ⇒ Float
The echo density in the late reverberation decay (%).
-
Minimum: 0.0
-
Maximum: 100.0
-
Default: 100.0
84 85 86 |
# File 'lib/fmod/core/reverb.rb', line 84 def diffusion=(value) self[:diffusion] = value.clamp(0.0, 100.0) end |
#early_delay ⇒ Float
Initial reflection delay time (ms).
-
Minimum: 0.0
-
Maximum: 300.0
-
Default: 7.0
44 45 46 |
# File 'lib/fmod/core/reverb.rb', line 44 def early_delay=(value) self[:early_delay] = value.clamp(0.0, 300.0) end |
#early_late_mix ⇒ Float
Early reflections level relative to room effect (%).
-
Minimum: 0.0
-
Maximum: 100.0
-
Default: 50.0
134 135 136 |
# File 'lib/fmod/core/reverb.rb', line 134 def early_late_mix=(value) self[:early_late_mix] = value.clamp(0.0, 100.0) end |
#hf_decay_ratio ⇒ Float
High-frequency to mid-frequency decay time ratio (%).
-
Minimum: 10.0
-
Maximum: 100.0
-
Default: 50.0
74 75 76 |
# File 'lib/fmod/core/reverb.rb', line 74 def hf_decay_ratio=(value) self[:hf_decay_ratio] = value.clamp(10.0, 100.0) end |
#hf_reference ⇒ Float
Reference high frequency (Hz).
-
Minimum: 20.0
-
Maximum: 20000.0
-
Default: 5000.0
64 65 66 |
# File 'lib/fmod/core/reverb.rb', line 64 def hf_reference=(value) self[:hf_reference] = value.clamp(20.0, 20000.0) end |
#high_cut ⇒ Float
Relative room effect level at high frequencies (Hz).
-
Minimum: 20.0
-
Maximum: 20000.0
-
Default: 20000.0
124 125 126 |
# File 'lib/fmod/core/reverb.rb', line 124 def high_cut=(value) self[:high_cut] = value.clamp(20.0, 20000.0) end |
#late_delay ⇒ Float
Late reverberation delay time relative to initial reflection (ms).
-
Minimum: 0.0
-
Maximum: 100.0
-
Default: 11.0
54 55 56 |
# File 'lib/fmod/core/reverb.rb', line 54 def late_delay=(value) self[:late_delay] = value.clamp(0.0, 100.0) end |
#low_shelf_freq ⇒ Float
Reference low frequency (Hz).
-
Minimum: 20.0
-
Maximum: 1000.0
-
Default: 250.0
104 105 106 |
# File 'lib/fmod/core/reverb.rb', line 104 def low_shelf_freq=(value) self[:low_shelf_freq] = value.clamp(20.0, 1000.0) end |
#low_shelf_gain ⇒ Float
Relative room effect level at low frequencies (dB).
-
Minimum: -36.0
-
Maximum: 12.0
-
Default: 0.0
114 115 116 |
# File 'lib/fmod/core/reverb.rb', line 114 def low_shelf_gain=(value) self[:low_shelf_gain] = value.clamp(-36.0, 12.0) end |
#wet_level ⇒ Float
Room effect level at mid frequencies (dB).
-
Minimum: -80.0
-
Maximum: 20.0
-
Default: -6.0
144 145 146 |
# File 'lib/fmod/core/reverb.rb', line 144 def wet_level=(value) self[:wet_level] = value.clamp(-80.0, 20.0) end |
Class Method Details
.alley ⇒ Reverb
Returns an alley environment.
275 276 277 |
# File 'lib/fmod/core/reverb.rb', line 275 def self.alley new [1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8].pack('f*') end |
.arena ⇒ Reverb
Returns an arena environment.
245 246 247 |
# File 'lib/fmod/core/reverb.rb', line 245 def self.arena new [7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6].pack('f*') end |
.auditorium ⇒ Reverb
Returns an auditorium environment.
227 228 229 |
# File 'lib/fmod/core/reverb.rb', line 227 def self.auditorium new [4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7].pack('f*') end |
.bathroom ⇒ Reverb
Returns a bathroom environment.
209 210 211 |
# File 'lib/fmod/core/reverb.rb', line 209 def self.bathroom new [1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5].pack('f*') end |
.carpeted_hallway ⇒ Reverb
Returns a carpeted hallway environment.
257 258 259 |
# File 'lib/fmod/core/reverb.rb', line 257 def self.carpeted_hallway new [300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0].pack('f*') end |
.cave ⇒ Reverb
Returns a cave environment.
239 240 241 |
# File 'lib/fmod/core/reverb.rb', line 239 def self.cave new [2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3].pack('f*') end |
.city ⇒ Reverb
Returns a city environment.
287 288 289 |
# File 'lib/fmod/core/reverb.rb', line 287 def self.city new [1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0].pack('f*') end |
.concert_hall ⇒ Reverb
Returns a concert hall environment.
233 234 235 |
# File 'lib/fmod/core/reverb.rb', line 233 def self.concert_hall new [3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8].pack('f*') end |
.forest ⇒ Reverb
Returns a forest environment.
281 282 283 |
# File 'lib/fmod/core/reverb.rb', line 281 def self.forest new [1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3].pack('f*') end |
.from_index(index) ⇒ Reverb
Returns a pre-mad Reverb preset from the specified FMOD::Core::ReverbIndex.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/fmod/core/reverb.rb', line 154 def self.from_index(index) case index when ReverbIndex::GENERIC then generic when ReverbIndex::PADDED_CELL then padded_cell when ReverbIndex::ROOM then room when ReverbIndex::BATHROOM then bathroom when ReverbIndex::LIVING_ROOM then living_room when ReverbIndex::STONE_ROOM then stone_room when ReverbIndex::AUDITORIUM then auditorium when ReverbIndex::CONCERT_HALL then concert_hall when ReverbIndex::CAVE then cave when ReverbIndex::ARENA then arena when ReverbIndex::HANGAR then hangar when ReverbIndex::CARPETED_HALLWAY then carpeted_hallway when ReverbIndex::HALLWAY then hallway when ReverbIndex::STONE_CORRIDOR then stone_corridor when ReverbIndex::ALLEY then alley when ReverbIndex::FOREST then forest when ReverbIndex::CITY then city when ReverbIndex::MOUNTAINS then mountains when ReverbIndex::QUARRY then quarry when ReverbIndex::PLAIN then plain when ReverbIndex::PARKING_LOT then parking_lot when ReverbIndex::SEWER_PIPE then sewer_pipe when ReverbIndex::UNDERWATER then underwater else off end end |
.generic ⇒ Reverb
Returns a generic reverb environment.
191 192 193 |
# File 'lib/fmod/core/reverb.rb', line 191 def self.generic new [1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0].pack('f*') end |
.hallway ⇒ Reverb
Returns a hallway environment.
263 264 265 |
# File 'lib/fmod/core/reverb.rb', line 263 def self.hallway new [1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5].pack('f*') end |
.hangar ⇒ Reverb
Returns a hangar environment.
251 252 253 |
# File 'lib/fmod/core/reverb.rb', line 251 def self.hangar new [10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4].pack('f*') end |
.living_room ⇒ Reverb
Returns a living room environment.
215 216 217 |
# File 'lib/fmod/core/reverb.rb', line 215 def self.living_room new [500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0].pack('f*') end |
.mountains ⇒ Reverb
Returns a mountain environment.
293 294 295 |
# File 'lib/fmod/core/reverb.rb', line 293 def self.mountains new [1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0].pack('f*') end |
.off ⇒ Reverb
Returns no reverberation.
185 186 187 |
# File 'lib/fmod/core/reverb.rb', line 185 def self.off new [1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0].pack('f*') end |
.padded_cell ⇒ Reverb
Returns a padded cell environment.
197 198 199 |
# File 'lib/fmod/core/reverb.rb', line 197 def self.padded_cell new [170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8].pack('f*') end |
.parking_lot ⇒ Reverb
Returns a parking lot environment.
311 312 313 |
# File 'lib/fmod/core/reverb.rb', line 311 def self.parking_lot new [1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5].pack('f*') end |
.plain ⇒ Reverb
Returns a plain environment.
305 306 307 |
# File 'lib/fmod/core/reverb.rb', line 305 def self.plain new [1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0].pack('f*') end |
.quarry ⇒ Reverb
Returns a quarry environment.
299 300 301 |
# File 'lib/fmod/core/reverb.rb', line 299 def self.quarry new [1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0].pack('f*') end |
.room ⇒ Reverb
Returns a room environment.
203 204 205 |
# File 'lib/fmod/core/reverb.rb', line 203 def self.room new [400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4].pack('f*') end |
.sewer_pipe ⇒ Reverb
Returns a sewer-pipe environment.
317 318 319 |
# File 'lib/fmod/core/reverb.rb', line 317 def self.sewer_pipe new [2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2].pack('f*') end |
.stone_corridor ⇒ Reverb
Returns a stone corridor environment.
269 270 271 |
# File 'lib/fmod/core/reverb.rb', line 269 def self.stone_corridor new [270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0].pack('f*') end |
.stone_room ⇒ Reverb
Returns a stone room environment.
221 222 223 |
# File 'lib/fmod/core/reverb.rb', line 221 def self.stone_room new [2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5].pack('f*') end |
.underwater ⇒ Reverb
Returns an underwater environment.
323 324 325 |
# File 'lib/fmod/core/reverb.rb', line 323 def self.underwater new [1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0].pack('f*') end |