fmod 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +5 -0
- data/.yardopts +2 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +96 -0
- data/Rakefile +1 -0
- data/bin/console +28 -0
- data/bin/setup +8 -0
- data/ext/fmod.dll +0 -0
- data/ext/fmod64.dll +0 -0
- data/ext/libfmod.dylib +0 -0
- data/ext/llbfmod.zip +0 -0
- data/extras/FMOD Studio Programmers API for Windows.chm +0 -0
- data/fmod.gemspec +58 -0
- data/lib/fmod.rb +564 -0
- data/lib/fmod/channel.rb +151 -0
- data/lib/fmod/channel_control.rb +821 -0
- data/lib/fmod/channel_group.rb +61 -0
- data/lib/fmod/core.rb +35 -0
- data/lib/fmod/core/bool_description.rb +18 -0
- data/lib/fmod/core/channel_mask.rb +24 -0
- data/lib/fmod/core/data_description.rb +14 -0
- data/lib/fmod/core/driver.rb +59 -0
- data/lib/fmod/core/dsp_description.rb +7 -0
- data/lib/fmod/core/dsp_index.rb +9 -0
- data/lib/fmod/core/dsp_type.rb +43 -0
- data/lib/fmod/core/extensions.rb +28 -0
- data/lib/fmod/core/file_system.rb +86 -0
- data/lib/fmod/core/filter_type.rb +19 -0
- data/lib/fmod/core/float_description.rb +16 -0
- data/lib/fmod/core/guid.rb +50 -0
- data/lib/fmod/core/init_flags.rb +19 -0
- data/lib/fmod/core/integer_description.rb +26 -0
- data/lib/fmod/core/mode.rb +36 -0
- data/lib/fmod/core/output_type.rb +30 -0
- data/lib/fmod/core/parameter_info.rb +41 -0
- data/lib/fmod/core/parameter_type.rb +10 -0
- data/lib/fmod/core/result.rb +88 -0
- data/lib/fmod/core/reverb.rb +217 -0
- data/lib/fmod/core/sound_ex_info.rb +7 -0
- data/lib/fmod/core/sound_format.rb +30 -0
- data/lib/fmod/core/sound_group_behavior.rb +9 -0
- data/lib/fmod/core/sound_type.rb +80 -0
- data/lib/fmod/core/speaker_index.rb +18 -0
- data/lib/fmod/core/speaker_mode.rb +16 -0
- data/lib/fmod/core/spectrum_data.rb +12 -0
- data/lib/fmod/core/structure.rb +23 -0
- data/lib/fmod/core/structures.rb +41 -0
- data/lib/fmod/core/tag.rb +51 -0
- data/lib/fmod/core/tag_data_type.rb +14 -0
- data/lib/fmod/core/time_unit.rb +40 -0
- data/lib/fmod/core/vector.rb +42 -0
- data/lib/fmod/core/window_type.rb +12 -0
- data/lib/fmod/dsp.rb +510 -0
- data/lib/fmod/dsp_connection.rb +113 -0
- data/lib/fmod/effects.rb +38 -0
- data/lib/fmod/effects/channel_mix.rb +101 -0
- data/lib/fmod/effects/chorus.rb +30 -0
- data/lib/fmod/effects/compressor.rb +52 -0
- data/lib/fmod/effects/convolution_reverb.rb +31 -0
- data/lib/fmod/effects/delay.rb +44 -0
- data/lib/fmod/effects/distortion.rb +16 -0
- data/lib/fmod/effects/dsps.rb +10 -0
- data/lib/fmod/effects/echo.rb +37 -0
- data/lib/fmod/effects/envelope_follower.rb +31 -0
- data/lib/fmod/effects/fader.rb +16 -0
- data/lib/fmod/effects/fft.rb +38 -0
- data/lib/fmod/effects/flange.rb +37 -0
- data/lib/fmod/effects/high_pass.rb +24 -0
- data/lib/fmod/effects/high_pass_simple.rb +25 -0
- data/lib/fmod/effects/it_echo.rb +56 -0
- data/lib/fmod/effects/it_lowpass.rb +36 -0
- data/lib/fmod/effects/ladspa_plugin.rb +14 -0
- data/lib/fmod/effects/limiter.rb +32 -0
- data/lib/fmod/effects/loudness_meter.rb +19 -0
- data/lib/fmod/effects/low_pass.rb +25 -0
- data/lib/fmod/effects/low_pass_simple.rb +26 -0
- data/lib/fmod/effects/mixer.rb +11 -0
- data/lib/fmod/effects/multiband_eq.rb +153 -0
- data/lib/fmod/effects/normalize.rb +47 -0
- data/lib/fmod/effects/object_pan.rb +62 -0
- data/lib/fmod/effects/oscillator.rb +52 -0
- data/lib/fmod/effects/pan.rb +166 -0
- data/lib/fmod/effects/param_eq.rb +36 -0
- data/lib/fmod/effects/pitch_shift.rb +47 -0
- data/lib/fmod/effects/return.rb +18 -0
- data/lib/fmod/effects/send.rb +21 -0
- data/lib/fmod/effects/sfx_reverb.rb +87 -0
- data/lib/fmod/effects/three_eq.rb +41 -0
- data/lib/fmod/effects/transceiver.rb +57 -0
- data/lib/fmod/effects/tremolo.rb +67 -0
- data/lib/fmod/effects/vst_plugin.rb +12 -0
- data/lib/fmod/effects/winamp_plugin.rb +12 -0
- data/lib/fmod/error.rb +108 -0
- data/lib/fmod/geometry.rb +380 -0
- data/lib/fmod/handle.rb +129 -0
- data/lib/fmod/reverb3D.rb +98 -0
- data/lib/fmod/sound.rb +810 -0
- data/lib/fmod/sound_group.rb +54 -0
- data/lib/fmod/system.rb +1242 -0
- data/lib/fmod/version.rb +3 -0
- metadata +220 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
module FMOD
|
|
3
|
+
module Effects
|
|
4
|
+
|
|
5
|
+
##
|
|
6
|
+
# This unit normalizes or amplifies the sound to a certain level.
|
|
7
|
+
#
|
|
8
|
+
# Normalize amplifies the sound based on the maximum peaks within the
|
|
9
|
+
# signal.
|
|
10
|
+
#
|
|
11
|
+
# For example if the maximum peaks in the signal were 50% of the bandwidth,
|
|
12
|
+
# it would scale the whole sound by 2.
|
|
13
|
+
#
|
|
14
|
+
# The lower threshold value makes the normalizer ignores peaks below a
|
|
15
|
+
# certain point, to avoid over-amplification if a loud signal suddenly came
|
|
16
|
+
# in, and also to avoid amplifying to maximum things like background hiss.
|
|
17
|
+
#
|
|
18
|
+
# Because FMOD is a realtime audio processor, it doesn't have the luxury of
|
|
19
|
+
# knowing the peak for the whole sound (ie it can't see into the future), so
|
|
20
|
+
# it has to process data as it comes in.
|
|
21
|
+
#
|
|
22
|
+
#
|
|
23
|
+
# To avoid very sudden changes in volume level based on small samples of new
|
|
24
|
+
# data, fmod fades towards the desired amplification which makes for smooth
|
|
25
|
+
# gain control. The fade-time parameter can control this.
|
|
26
|
+
#
|
|
27
|
+
# @attr fade_time [Float] Time to ramp the silence to full in ms.
|
|
28
|
+
# * *Minimum:* 0.0
|
|
29
|
+
# * *Maximum:* 20000.0
|
|
30
|
+
# * *Default:* 5000.0
|
|
31
|
+
# @attr threshold [Float] Lower volume range threshold to ignore. Raise
|
|
32
|
+
# higher to stop amplification of very quiet signals.
|
|
33
|
+
# * *Minimum:* 0.0
|
|
34
|
+
# * *Maximum:* 1.0
|
|
35
|
+
# * *Default:* 0.1
|
|
36
|
+
# @attr max_amp [Float] Maximum amplification allowed. Higher values allow
|
|
37
|
+
# more boost.
|
|
38
|
+
# * *Minimum:* 1.0 (no amplification)
|
|
39
|
+
# * *Maximum:* 100000.0
|
|
40
|
+
# * *Default:* 20.0
|
|
41
|
+
class Normalize < Dsp
|
|
42
|
+
float_param(0, :fade_time, min: 0.0, max: 20000.0)
|
|
43
|
+
float_param(1, :threshold, min: 0.0, max: 1.0)
|
|
44
|
+
float_param(2, :max_amp, min: 1.0, max: 100000.0)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
module FMOD
|
|
2
|
+
module Effects
|
|
3
|
+
|
|
4
|
+
##
|
|
5
|
+
# This unit sends the signal to a 3d object encoder like Dolby Atmos.
|
|
6
|
+
# Supports a subset of the {DspType::PAN} parameters.
|
|
7
|
+
#
|
|
8
|
+
# 3D Object panners are meant for hardware 3d object systems like Dolby
|
|
9
|
+
# Atmos or Sony Morpheus. These object panners take input in, and send it to
|
|
10
|
+
# the 7.1 bed, but do not send the signal further down the DSP chain (the
|
|
11
|
+
# output of the dsp is silence).
|
|
12
|
+
#
|
|
13
|
+
# @attr position [Pointer|String] 3D Position
|
|
14
|
+
# @attr rolloff [Integer] 3D Rolloff
|
|
15
|
+
# * *Minimum:* 0
|
|
16
|
+
# * *Maximum:* 4
|
|
17
|
+
# * *Default:* 0 (linear-squared)
|
|
18
|
+
# @see Pan::ROLLOFF_LINEAR_SQUARED
|
|
19
|
+
# @see Pan::ROLLOFF_LINEAR
|
|
20
|
+
# @see Pan::ROLLOFF_INVERSE
|
|
21
|
+
# @see Pan::ROLLOFF_INVERSE_TAPERED
|
|
22
|
+
# @see Pan::ROLLOFF_CUSTOM
|
|
23
|
+
# @attr min_distance [Float] 3D Min Distance
|
|
24
|
+
# * *Minimum:* 0.0
|
|
25
|
+
# * *Default:* 1.0
|
|
26
|
+
# @attr max_distance [Float] 3D Max Distance
|
|
27
|
+
# * *Minimum:* 0.0
|
|
28
|
+
# * *Default:* 1.0
|
|
29
|
+
# @attr extent_mode [Integer] 3D Extent Mode
|
|
30
|
+
# * *Minimum:* 0 (auto)
|
|
31
|
+
# * *Maximum:* 2 (off)
|
|
32
|
+
# * *Default:* 0 (auto)
|
|
33
|
+
# @see Pan::EXTENT_AUTO
|
|
34
|
+
# @see Pan::EXTENT_USER
|
|
35
|
+
# @see Pan::EXTENT_OFF
|
|
36
|
+
# @attr sound_size [Float] 3D Sound Size
|
|
37
|
+
# * *Minimum:* 0.0
|
|
38
|
+
# * *Default:* 0.0
|
|
39
|
+
# @attr min_extent [Float] 3D Min Extent (degrees)
|
|
40
|
+
# * *Minimum:* 0.0
|
|
41
|
+
# * *Maximum:* 360.0
|
|
42
|
+
# * *Default:* 0.0
|
|
43
|
+
# @attr overall_gain [Pointer|String] Overall gain. For information only,
|
|
44
|
+
# not set by user. Allows FMOD to know the DSP is scaling the signal for
|
|
45
|
+
# virtualization purposes.
|
|
46
|
+
# @attr output_gain [Float] Output gain level, linear scale. For the user to
|
|
47
|
+
# scale the output of the object panner's signal.
|
|
48
|
+
# * *Minimum:* 0.0
|
|
49
|
+
# * *Maximum:* 1.0
|
|
50
|
+
class ObjectPan < Dsp
|
|
51
|
+
data_param(0, :position)
|
|
52
|
+
integer_param(1, :rolloff, min: 0, max: 4)
|
|
53
|
+
float_param(2, :min_distance, min: 0.0)
|
|
54
|
+
float_param(3, :max_distance, min: 0.0)
|
|
55
|
+
integer_param(4, :extent_mode, min: 0, max: 2)
|
|
56
|
+
float_param(5, :sound_size, min: 0.0)
|
|
57
|
+
float_param(6, :min_extent, min: 0.0, max: 360.0)
|
|
58
|
+
data_param(7, :overall_gain)
|
|
59
|
+
float_param(8, :output_gain, min: 0.0, max: 20.0)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
module FMOD
|
|
3
|
+
module Effects
|
|
4
|
+
|
|
5
|
+
##
|
|
6
|
+
# This unit generates sine/square/saw/triangle or noise tones.
|
|
7
|
+
#
|
|
8
|
+
# @attr waveform [Integer] Waveform type.
|
|
9
|
+
# * *Minimum:* 0
|
|
10
|
+
# * *Maximum:* 5
|
|
11
|
+
# * *Default:* 0 (sine)
|
|
12
|
+
# @see SINE
|
|
13
|
+
# @see SQUARE
|
|
14
|
+
# @see SAW_UP
|
|
15
|
+
# @see SAW_DOWN
|
|
16
|
+
# @see TRIANGLE
|
|
17
|
+
# @see NOISE
|
|
18
|
+
# @attr rate [Float] Frequency of the sine-wave in Hz.
|
|
19
|
+
# * *Minimum:* 1.0
|
|
20
|
+
# * *Maximum:* 22000.0
|
|
21
|
+
# * *Default:* 220.0
|
|
22
|
+
class Oscillator < Dsp
|
|
23
|
+
|
|
24
|
+
##
|
|
25
|
+
# Strongly-typed waveform shape for {#waveform} parameter.
|
|
26
|
+
SINE = 0
|
|
27
|
+
|
|
28
|
+
##
|
|
29
|
+
# Strongly-typed waveform shape for {#waveform} parameter.
|
|
30
|
+
SQUARE = 1
|
|
31
|
+
|
|
32
|
+
##
|
|
33
|
+
# Strongly-typed waveform shape for {#waveform} parameter.
|
|
34
|
+
SAW_UP = 2
|
|
35
|
+
|
|
36
|
+
##
|
|
37
|
+
# Strongly-typed waveform shape for {#waveform} parameter.
|
|
38
|
+
SAW_DOWN = 3
|
|
39
|
+
|
|
40
|
+
##
|
|
41
|
+
# Strongly-typed waveform shape for {#waveform} parameter.
|
|
42
|
+
TRIANGLE = 4
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# Strongly-typed waveform shape for {#waveform} parameter.
|
|
46
|
+
NOISE = 5
|
|
47
|
+
|
|
48
|
+
integer_param(0, :waveform, min: 0, max: 5)
|
|
49
|
+
float_param(1, :rate, min: 1.0, max: 22000.0)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
module FMOD
|
|
2
|
+
module Effects
|
|
3
|
+
|
|
4
|
+
##
|
|
5
|
+
# This unit pans the signal, possibly up-mixing or down-mixing as well.
|
|
6
|
+
#
|
|
7
|
+
# @attr panning_mode [Integer] Panner mode.
|
|
8
|
+
# * *0:* Mono down-mix
|
|
9
|
+
# * *1:* Stereo panning
|
|
10
|
+
# * *2:* Surround panning
|
|
11
|
+
# @attr stereo_position [Float] 2D Stereo pan position.
|
|
12
|
+
# * *Minimum:* -100.0
|
|
13
|
+
# * *Maximum:* 100.0
|
|
14
|
+
# * *Default:* 0.0
|
|
15
|
+
# @attr surround_direction [Float] 2D Surround pan direction. Direction from
|
|
16
|
+
# center point of panning circle, in degrees.
|
|
17
|
+
# * *Minimum:* -180.0 (rear-speakers center point)
|
|
18
|
+
# * *Maximum:* 180.0 (rear-speakers center point)
|
|
19
|
+
# * *Default:* 0.0 (front-center)
|
|
20
|
+
# @attr surround_extent [Float] 2D Surround pan extent. Distance from center
|
|
21
|
+
# point of panning circle, in degrees.
|
|
22
|
+
# * *Minimum:* 0.0
|
|
23
|
+
# * *Maximum:* 360.0
|
|
24
|
+
# * *Default:* 360.0
|
|
25
|
+
# @attr surround_rotation [Float] 2D Surround pan rotation.
|
|
26
|
+
# * *Minimum:* -180.0 (degrees)
|
|
27
|
+
# * *Maximum:* 180.0 (degrees)
|
|
28
|
+
# * *Default:* 0.0
|
|
29
|
+
# @attr surround_lfe_level [Float] 2D Surround pan LFE level. 2D LFE level
|
|
30
|
+
# in dB.
|
|
31
|
+
# * *Minimum:* -80.0
|
|
32
|
+
# * *Maximum:* 20.0
|
|
33
|
+
# * *Default:* 0.0
|
|
34
|
+
# @attr stereo_surround [Integer] Stereo-to-surround mode.
|
|
35
|
+
# * *0:* Distributed
|
|
36
|
+
# * *1:* Discrete (default)
|
|
37
|
+
# @attr surround_stereo_separation [Float] Stereo-To-Surround Stereo (only
|
|
38
|
+
# for {#stereo_surround}) "discrete" mode). Separation/width of L/R parts
|
|
39
|
+
# of stereo sound, in degrees.
|
|
40
|
+
# * *Minimum:* -180.0
|
|
41
|
+
# * *Maximum:* 180.0
|
|
42
|
+
# * *Default:* 60.0
|
|
43
|
+
# @attr surround_stereo_axis [Float] Stereo-To-Surround Stereo (only for
|
|
44
|
+
# {#stereo_surround}) "discrete" mode). Axis/rotation of L/R parts of
|
|
45
|
+
# stereo sound, in degrees.
|
|
46
|
+
# * *Minimum:* -180.0
|
|
47
|
+
# * *Maximum:* 180.0
|
|
48
|
+
# * *Default:* 0.0
|
|
49
|
+
# @attr surround_speakers [Integer] Speakers Enabled. Bit-mask for each
|
|
50
|
+
# speaker from 0 to 32 to be considered by panner. Use to disable speakers
|
|
51
|
+
# from being panned to.
|
|
52
|
+
# * *Minimum:* 0
|
|
53
|
+
# * *Maximum:* 0xFFF
|
|
54
|
+
# * *Default:* 0xFFF (all on)
|
|
55
|
+
# @attr position [Pointer|String] 3D Position.
|
|
56
|
+
# @attr rolloff [Integer] 3D Rolloff.
|
|
57
|
+
# * *Minimum:* 0
|
|
58
|
+
# * *Maximum:* 4
|
|
59
|
+
# * *Default:* 0 (linear-squared)
|
|
60
|
+
# @see ROLLOFF_LINEAR_SQUARED
|
|
61
|
+
# @see ROLLOFF_LINEAR
|
|
62
|
+
# @see ROLLOFF_INVERSE
|
|
63
|
+
# @see ROLLOFF_INVERSE_TAPERED
|
|
64
|
+
# @see ROLLOFF_CUSTOM
|
|
65
|
+
# @attr min_distance [Float] 3D Min Distance.
|
|
66
|
+
# * *Minimum:* 0.0
|
|
67
|
+
# * *Default:* 1.0
|
|
68
|
+
# @attr max_distance [Float] 3D Max Distance.
|
|
69
|
+
# * *Minimum:* 0.0
|
|
70
|
+
# * *Default:* 20.0
|
|
71
|
+
# @attr extent_mode [Integer] 3D Extent Mode.
|
|
72
|
+
# * *Minimum:* 0 (auto)
|
|
73
|
+
# * *Maximum:* 2 (off)
|
|
74
|
+
# * *Default:* 0 (auto)
|
|
75
|
+
# @see EXTENT_AUTO
|
|
76
|
+
# @see EXTENT_USER
|
|
77
|
+
# @see EXTENT_OFF
|
|
78
|
+
# @attr sound_size [Float] 3D Sound Size.
|
|
79
|
+
# * *Minimum:* 0.0
|
|
80
|
+
# * *Default:* 0.0
|
|
81
|
+
# @attr min_extent [Float] 3D Min Extent.
|
|
82
|
+
# * *Minimum:* 0.0 (degrees)
|
|
83
|
+
# * *Maximum:* 360.0 (degrees)
|
|
84
|
+
# * *Default:* 0.0
|
|
85
|
+
# @attr pan_blend [Float] 3D Pan Blend.
|
|
86
|
+
# * *Minimum:* 0.0 (fully 2D)
|
|
87
|
+
# * *Maximum:* 1.0 (fully 3D)
|
|
88
|
+
# * *Default:* 0.0
|
|
89
|
+
# @attr lfe_upmix_enabled [Integer] LFE Up-mix Enabled. Determines whether
|
|
90
|
+
# non-LFE source channels should mix to the LFE or leave it alone.
|
|
91
|
+
# * *Minimum:* 0 (off)
|
|
92
|
+
# * *Maximum:* 1 (on)
|
|
93
|
+
# * *Default:* 0 (off)
|
|
94
|
+
# @attr overall_gain [Pointer] Overall gain. For information only,
|
|
95
|
+
# not set by user. Data to provide to FMOD, to allow FMOD to know the DSP
|
|
96
|
+
# is scaling the signal for virtualization purposes.
|
|
97
|
+
# @attr speaker_mode [Integer] Surround speaker mode. Target speaker mode
|
|
98
|
+
# for surround panning.
|
|
99
|
+
# * *Minimum:* 0
|
|
100
|
+
# * *Maximum:* 9
|
|
101
|
+
# * *Default:* {SpeakerMode::DEFAULT}
|
|
102
|
+
# @see SpeakerMode
|
|
103
|
+
# @attr height_blend [Float] 2D Height blend. When the input or
|
|
104
|
+
# {#speaker_mode} has height speakers, control the blend between ground
|
|
105
|
+
# and height.
|
|
106
|
+
# * *Minimum:* -1.0 (push top speakers to ground)
|
|
107
|
+
# * *Maximum:* 1.0 (push ground speakers to top)
|
|
108
|
+
# * *Default:* 0.0 (preserve top / ground separation)
|
|
109
|
+
class Pan < Dsp
|
|
110
|
+
integer_param(0, :panning_mode, min: 0, max: 2)
|
|
111
|
+
float_param(1, :stereo_position, min: -100.0, max: 100.0)
|
|
112
|
+
float_param(2, :surround_direction, min: -180.0, max: 180.0)
|
|
113
|
+
float_param(3, :surround_extent, min: 0.0, max: 360.0)
|
|
114
|
+
float_param(4, :surround_rotation, min: -180.0, max: 180.0)
|
|
115
|
+
float_param(5, :surround_lfe_level, min: -80.0, max: 20.0)
|
|
116
|
+
integer_param(6, :stereo_surround, min: 0, max: 1)
|
|
117
|
+
float_param(7, :surround_stereo_separation, min: -180.0, max: 180.0)
|
|
118
|
+
float_param(8, :surround_stereo_axis, min: -180.0, max: 180.0)
|
|
119
|
+
integer_param(9, :surround_speakers, min: 0, max: 4095)
|
|
120
|
+
data_param(10, :position)
|
|
121
|
+
integer_param(11, :rolloff, min: 0, max: 4)
|
|
122
|
+
float_param(12, :min_distance, min: 0.0)
|
|
123
|
+
float_param(13, :max_distance, min: 0.0)
|
|
124
|
+
integer_param(14, :extent_mode, min: 0, max: 2)
|
|
125
|
+
float_param(15, :sound_size, min: 0.0)
|
|
126
|
+
float_param(16, :min_extent, min: 0.0, max: 360.0)
|
|
127
|
+
float_param(17, :pan_blend, min: 0.0, max: 1.0)
|
|
128
|
+
integer_param(18, :lfe_upmix_enabled, min: 0, max: 1)
|
|
129
|
+
data_param(19, :overall_gain)
|
|
130
|
+
integer_param(20, :speaker_mode, min: 0, max: 8)
|
|
131
|
+
float_param(21, :height_blend, min: -1.0, max: 1.0)
|
|
132
|
+
|
|
133
|
+
##
|
|
134
|
+
# Strongly-typed value used with {#extent_mode}.
|
|
135
|
+
EXTENT_AUTO = 0
|
|
136
|
+
|
|
137
|
+
##
|
|
138
|
+
# Strongly-typed value used with {#extent_mode}.
|
|
139
|
+
EXTENT_USER = 1
|
|
140
|
+
|
|
141
|
+
##
|
|
142
|
+
# Strongly-typed value used with {#extent_mode}.
|
|
143
|
+
EXTENT_OFF = 2
|
|
144
|
+
|
|
145
|
+
##
|
|
146
|
+
# Strongly typed 3D rolloff value used with {#rolloff}.
|
|
147
|
+
ROLLOFF_LINEAR_SQUARED = 0
|
|
148
|
+
|
|
149
|
+
##
|
|
150
|
+
# Strongly typed 3D rolloff value used with {#rolloff}.
|
|
151
|
+
ROLLOFF_LINEAR = 1
|
|
152
|
+
|
|
153
|
+
##
|
|
154
|
+
# Strongly typed 3D rolloff value used with {#rolloff}.
|
|
155
|
+
ROLLOFF_INVERSE = 2
|
|
156
|
+
|
|
157
|
+
##
|
|
158
|
+
# Strongly typed 3D rolloff value used with {#rolloff}.
|
|
159
|
+
ROLLOFF_INVERSE_TAPERED = 3
|
|
160
|
+
|
|
161
|
+
##
|
|
162
|
+
# Strongly typed 3D rolloff value used with {#rolloff}.
|
|
163
|
+
ROLLOFF_CUSTOM = 4
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
module FMOD
|
|
3
|
+
module Effects
|
|
4
|
+
|
|
5
|
+
##
|
|
6
|
+
# @deprecated Will be removed in a future FMOD version. See {MultibandEq}
|
|
7
|
+
# for alternatives.
|
|
8
|
+
#
|
|
9
|
+
# This unit attenuates or amplifies a selected frequency range.
|
|
10
|
+
#
|
|
11
|
+
# Parametric EQ is a single band peaking EQ filter that attenuates or
|
|
12
|
+
# amplifies a selected frequency and its neighbouring frequencies.
|
|
13
|
+
#
|
|
14
|
+
# When a frequency has its gain set to 1.0, the sound will be unaffected and
|
|
15
|
+
# represents the original signal exactly.
|
|
16
|
+
#
|
|
17
|
+
# @attr center [Float] Frequency center.
|
|
18
|
+
# * *Minimum:* 20.0
|
|
19
|
+
# * *Maximum:* 22000.0
|
|
20
|
+
# * *Default:* 8000.0
|
|
21
|
+
# @attr bandwidth [Float] Octave range around the center frequency to
|
|
22
|
+
# filter.
|
|
23
|
+
# * *Minimum:* 0.2
|
|
24
|
+
# * *Maximum:* 5.0
|
|
25
|
+
# * *Default:* 1.0
|
|
26
|
+
# @attr gain [Float] Frequency gain in dB.
|
|
27
|
+
# * *Minimum:* -30.0
|
|
28
|
+
# * *Maximum:* 30.0
|
|
29
|
+
# * *Default:* 0.0
|
|
30
|
+
class ParamEq < Dsp
|
|
31
|
+
float_param(0, :center, min: 20.0, max: 22000.0)
|
|
32
|
+
float_param(1, :bandwidth, min: 0.2, max: 5.0)
|
|
33
|
+
float_param(2, :gain, min: -30.0, max: 30.0)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module FMOD
|
|
2
|
+
module Effects
|
|
3
|
+
|
|
4
|
+
##
|
|
5
|
+
# This unit bends the pitch of a sound without changing the speed of playback.
|
|
6
|
+
#
|
|
7
|
+
# This pitch shifting unit can be used to change the pitch of a sound
|
|
8
|
+
# without speeding it up or slowing it down.
|
|
9
|
+
#
|
|
10
|
+
# It can also be used for time stretching or scaling, for example if the
|
|
11
|
+
# pitch was doubled, and the frequency of the sound was halved, the pitch of
|
|
12
|
+
# the sound would sound correct but it would be twice as slow.
|
|
13
|
+
#
|
|
14
|
+
# @note This filter is very computationally expensive! Similar to a vocoder,
|
|
15
|
+
# it requires several overlapping FFT and IFFT's to produce smooth output,
|
|
16
|
+
# and can require around 440mhz for 1 stereo 48khz signal using the
|
|
17
|
+
# default settings.
|
|
18
|
+
#
|
|
19
|
+
# Reducing the signal to mono will half the CPU usage.
|
|
20
|
+
#
|
|
21
|
+
# Reducing this will lower audio quality, but what settings to use are
|
|
22
|
+
# largely dependant on the sound being played. A noisy polyphonic signal
|
|
23
|
+
# will need higher FFT size compared to a speaking voice for example.
|
|
24
|
+
#
|
|
25
|
+
# @attr pitch [Float] Pitch value.
|
|
26
|
+
# * *Minimum:* 0.5 (one octave lower)
|
|
27
|
+
# * *Maximum:* 2.0 (one octave higher)
|
|
28
|
+
# * *Default:* 1.0 (normal)
|
|
29
|
+
# @attr window_size [Float] FFT window size. Increase this to reduce
|
|
30
|
+
# "smearing". This effect is a warbling sound similar to when an MP3 is
|
|
31
|
+
# encoded at very low bit-rates.
|
|
32
|
+
# * *Minimum:* 256
|
|
33
|
+
# * *Maximum:* 4096
|
|
34
|
+
# * *Default:* 1024
|
|
35
|
+
# * *Valid:* 256, 512, 1024, 2048, 4096
|
|
36
|
+
# @attr max_channels [Float] Maximum channels supported. 0 = same
|
|
37
|
+
# as FMOD's default output polyphony, 1 = mono, 2 = stereo etc.
|
|
38
|
+
# * *Minimum:* 0
|
|
39
|
+
# * *Maximum:* 16
|
|
40
|
+
# * *Default:* 0 (strongly recommended to leave at 0!)
|
|
41
|
+
class PitchShift < Dsp
|
|
42
|
+
float_param(0, :pitch, min: 0.5, max: 2.0)
|
|
43
|
+
float_param(1, :window_size, min: 256, max: 4096)
|
|
44
|
+
float_param(3, :max_channels, min: 0, max: 16)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
module FMOD
|
|
3
|
+
module Effects
|
|
4
|
+
|
|
5
|
+
##
|
|
6
|
+
# This unit receives signals from a number of send DSPs.
|
|
7
|
+
#
|
|
8
|
+
# @attr_reader id [Integer] ID of this Return DSP.
|
|
9
|
+
# * *Default:* -1
|
|
10
|
+
# @attr speaker_mode [Integer] Input speaker mode of this return.
|
|
11
|
+
# * *Default:* {SpeakerMode::DEFAULT}
|
|
12
|
+
# @see SpeakerMode
|
|
13
|
+
class Return < Dsp
|
|
14
|
+
integer_param(0, :id, readonly: true)
|
|
15
|
+
integer_param(1, :speaker_mode, min: 0, max: 9)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
module FMOD
|
|
3
|
+
module Effects
|
|
4
|
+
|
|
5
|
+
##
|
|
6
|
+
# This unit sends a copy of the signal to a return DSP anywhere in the DSP
|
|
7
|
+
# tree.
|
|
8
|
+
#
|
|
9
|
+
# @attr id [Integer] ID of the Return DSP this send is connected to (integer
|
|
10
|
+
# values only).
|
|
11
|
+
# * *Default:* -1 (indicates no connected {Return} DSP)
|
|
12
|
+
# @attr level [Float] Send level.
|
|
13
|
+
# * *Minimum:* 0.0
|
|
14
|
+
# * *Maximum:* 1.0
|
|
15
|
+
# * *Default:* 1.0
|
|
16
|
+
class Send < Dsp
|
|
17
|
+
integer_param(0, :id, min: -1)
|
|
18
|
+
integer_param(1, :level, min: 0.0, max: 1.0)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|