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.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.travis.yml +5 -0
  4. data/.yardopts +2 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +5 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +96 -0
  9. data/Rakefile +1 -0
  10. data/bin/console +28 -0
  11. data/bin/setup +8 -0
  12. data/ext/fmod.dll +0 -0
  13. data/ext/fmod64.dll +0 -0
  14. data/ext/libfmod.dylib +0 -0
  15. data/ext/llbfmod.zip +0 -0
  16. data/extras/FMOD Studio Programmers API for Windows.chm +0 -0
  17. data/fmod.gemspec +58 -0
  18. data/lib/fmod.rb +564 -0
  19. data/lib/fmod/channel.rb +151 -0
  20. data/lib/fmod/channel_control.rb +821 -0
  21. data/lib/fmod/channel_group.rb +61 -0
  22. data/lib/fmod/core.rb +35 -0
  23. data/lib/fmod/core/bool_description.rb +18 -0
  24. data/lib/fmod/core/channel_mask.rb +24 -0
  25. data/lib/fmod/core/data_description.rb +14 -0
  26. data/lib/fmod/core/driver.rb +59 -0
  27. data/lib/fmod/core/dsp_description.rb +7 -0
  28. data/lib/fmod/core/dsp_index.rb +9 -0
  29. data/lib/fmod/core/dsp_type.rb +43 -0
  30. data/lib/fmod/core/extensions.rb +28 -0
  31. data/lib/fmod/core/file_system.rb +86 -0
  32. data/lib/fmod/core/filter_type.rb +19 -0
  33. data/lib/fmod/core/float_description.rb +16 -0
  34. data/lib/fmod/core/guid.rb +50 -0
  35. data/lib/fmod/core/init_flags.rb +19 -0
  36. data/lib/fmod/core/integer_description.rb +26 -0
  37. data/lib/fmod/core/mode.rb +36 -0
  38. data/lib/fmod/core/output_type.rb +30 -0
  39. data/lib/fmod/core/parameter_info.rb +41 -0
  40. data/lib/fmod/core/parameter_type.rb +10 -0
  41. data/lib/fmod/core/result.rb +88 -0
  42. data/lib/fmod/core/reverb.rb +217 -0
  43. data/lib/fmod/core/sound_ex_info.rb +7 -0
  44. data/lib/fmod/core/sound_format.rb +30 -0
  45. data/lib/fmod/core/sound_group_behavior.rb +9 -0
  46. data/lib/fmod/core/sound_type.rb +80 -0
  47. data/lib/fmod/core/speaker_index.rb +18 -0
  48. data/lib/fmod/core/speaker_mode.rb +16 -0
  49. data/lib/fmod/core/spectrum_data.rb +12 -0
  50. data/lib/fmod/core/structure.rb +23 -0
  51. data/lib/fmod/core/structures.rb +41 -0
  52. data/lib/fmod/core/tag.rb +51 -0
  53. data/lib/fmod/core/tag_data_type.rb +14 -0
  54. data/lib/fmod/core/time_unit.rb +40 -0
  55. data/lib/fmod/core/vector.rb +42 -0
  56. data/lib/fmod/core/window_type.rb +12 -0
  57. data/lib/fmod/dsp.rb +510 -0
  58. data/lib/fmod/dsp_connection.rb +113 -0
  59. data/lib/fmod/effects.rb +38 -0
  60. data/lib/fmod/effects/channel_mix.rb +101 -0
  61. data/lib/fmod/effects/chorus.rb +30 -0
  62. data/lib/fmod/effects/compressor.rb +52 -0
  63. data/lib/fmod/effects/convolution_reverb.rb +31 -0
  64. data/lib/fmod/effects/delay.rb +44 -0
  65. data/lib/fmod/effects/distortion.rb +16 -0
  66. data/lib/fmod/effects/dsps.rb +10 -0
  67. data/lib/fmod/effects/echo.rb +37 -0
  68. data/lib/fmod/effects/envelope_follower.rb +31 -0
  69. data/lib/fmod/effects/fader.rb +16 -0
  70. data/lib/fmod/effects/fft.rb +38 -0
  71. data/lib/fmod/effects/flange.rb +37 -0
  72. data/lib/fmod/effects/high_pass.rb +24 -0
  73. data/lib/fmod/effects/high_pass_simple.rb +25 -0
  74. data/lib/fmod/effects/it_echo.rb +56 -0
  75. data/lib/fmod/effects/it_lowpass.rb +36 -0
  76. data/lib/fmod/effects/ladspa_plugin.rb +14 -0
  77. data/lib/fmod/effects/limiter.rb +32 -0
  78. data/lib/fmod/effects/loudness_meter.rb +19 -0
  79. data/lib/fmod/effects/low_pass.rb +25 -0
  80. data/lib/fmod/effects/low_pass_simple.rb +26 -0
  81. data/lib/fmod/effects/mixer.rb +11 -0
  82. data/lib/fmod/effects/multiband_eq.rb +153 -0
  83. data/lib/fmod/effects/normalize.rb +47 -0
  84. data/lib/fmod/effects/object_pan.rb +62 -0
  85. data/lib/fmod/effects/oscillator.rb +52 -0
  86. data/lib/fmod/effects/pan.rb +166 -0
  87. data/lib/fmod/effects/param_eq.rb +36 -0
  88. data/lib/fmod/effects/pitch_shift.rb +47 -0
  89. data/lib/fmod/effects/return.rb +18 -0
  90. data/lib/fmod/effects/send.rb +21 -0
  91. data/lib/fmod/effects/sfx_reverb.rb +87 -0
  92. data/lib/fmod/effects/three_eq.rb +41 -0
  93. data/lib/fmod/effects/transceiver.rb +57 -0
  94. data/lib/fmod/effects/tremolo.rb +67 -0
  95. data/lib/fmod/effects/vst_plugin.rb +12 -0
  96. data/lib/fmod/effects/winamp_plugin.rb +12 -0
  97. data/lib/fmod/error.rb +108 -0
  98. data/lib/fmod/geometry.rb +380 -0
  99. data/lib/fmod/handle.rb +129 -0
  100. data/lib/fmod/reverb3D.rb +98 -0
  101. data/lib/fmod/sound.rb +810 -0
  102. data/lib/fmod/sound_group.rb +54 -0
  103. data/lib/fmod/system.rb +1242 -0
  104. data/lib/fmod/version.rb +3 -0
  105. metadata +220 -0
@@ -0,0 +1,113 @@
1
+
2
+ module FMOD
3
+ class DspConnection < Handle
4
+
5
+ ##
6
+ # Default connection type. Audio is mixed from the input to the output DSP's
7
+ # audible buffer.
8
+ STANDARD = 0
9
+ ##
10
+ # Sidechain connection type. Audio is mixed from the input to the output
11
+ # DSP's sidechain buffer.
12
+ SIDECHAIN = 1
13
+ ##
14
+ # Send connection type. Audio is mixed from the input to the output DSP's
15
+ # audible buffer, but the input is *NOT* executed, only copied from. A
16
+ # standard connection or sidechain needs to make an input execute to
17
+ # generate.rb data.
18
+ SEND = 2
19
+ ##
20
+ # Send sidechain connection type. Audio is mixed from the input to the
21
+ # output DSP's sidechain buffer, but the input is *NOT* executed, only
22
+ # copied from. A standard connection or sidechain needs to make an input
23
+ # execute to generate.rb data.
24
+ SEND_SIDECHAIN = 3
25
+
26
+ ##
27
+ # @!attribute [r] type
28
+ # @return [Integer] the type of the connection between 2 DSP units.
29
+ #
30
+ # Will be one of the following:
31
+ # * {STANDARD}
32
+ # * {SIDECHAIN}
33
+ # * {SEND}
34
+ # * {SEND_SIDECHAIN}
35
+ integer_reader(:type, :DSPConnection_GetType)
36
+
37
+ ##
38
+ # @!attribute mix
39
+ # The volume of the connection - the scale level of the input before being
40
+ # passed to the output.
41
+ # * *Minimum:* 0.0 (silent)
42
+ # * *Maximum:* 1.0 (full volume)
43
+ # * *Default:* 1.0
44
+ # @return [Float] the volume or mix level.
45
+ float_reader(:mix, :DSPConnection_GetMix)
46
+ float_writer(:mix=, :DSPConnection_SetMix, 0.0, 1.0)
47
+
48
+ ##
49
+ # @!attribute [r] input
50
+ # @return [Dsp] the DSP unit that is the input of this connection.
51
+ def input
52
+ dsp = int_ptr
53
+ FMOD.invoke(:DSPConnection_GetInput, self, dsp)
54
+ Dsp.from_handle(dsp)
55
+ end
56
+
57
+ ##
58
+ # @!attribute [r] input
59
+ # @return [Dsp] the DSP unit that is the output of this connection.
60
+ def output
61
+ dsp = int_ptr
62
+ FMOD.invoke(:DSPConnection_GetOutput, self, dsp)
63
+ Dsp.from_handle(dsp)
64
+ end
65
+
66
+ ##
67
+ # @!attribute matrix
68
+ # A 2D pan matrix that maps input channels (columns) to output speakers
69
+ # (rows).
70
+ #
71
+ # Levels can be below 0 to invert a signal and above 1 to amplify the
72
+ # signal. Note that increasing the signal level too far may cause audible
73
+ # distortion.
74
+ #
75
+ # The matrix size will generally be the size of the number of channels in
76
+ # the current speaker mode. Use {System.software_format }to determine this.
77
+ #
78
+ # If a matrix already exists then the matrix passed in will applied over the
79
+ # top of it. The input matrix can be smaller than the existing matrix.
80
+ #
81
+ # A "unit" matrix allows a signal to pass through unchanged. For example for
82
+ # a 5.1 matrix a unit matrix would look like this:
83
+ # [[ 1, 0, 0, 0, 0, 0 ]
84
+ # [ 0, 1, 0, 0, 0, 0 ]
85
+ # [ 0, 0, 1, 0, 0, 0 ]
86
+ # [ 0, 0, 0, 1, 0, 0 ]
87
+ # [ 0, 0, 0, 0, 1, 0 ]
88
+ # [ 0, 0, 0, 0, 0, 1 ]]
89
+ #
90
+ # @return [Array<Array<Float>>] a 2-dimensional array of volume levels in
91
+ # row-major order. Each row represents an output speaker, each column
92
+ # represents an input channel.
93
+ def matrix
94
+ o, i = "\0" * SIZEOF_INT, "\0" * SIZEOF_INT
95
+ FMOD.invoke(:DSPConnection_GetMixMatrix, self, nil, o, i, 0)
96
+ o, i = o.unpack1('l'), i.unpack1('l')
97
+ return [] if o.zero? || i.zero?
98
+ buffer = "\0" * (SIZEOF_FLOAT * o * i)
99
+ FMOD.invoke(:DSPConnection_GetMixMatrix, self, buffer, nil, nil, 0)
100
+ buffer.unpack('f*').each_slice(i).to_a
101
+ end
102
+
103
+ def matrix=(matrix)
104
+ out_count, in_count = matrix.size, matrix.first.size
105
+ unless matrix.all? { |ary| ary.size == in_count }
106
+ raise Error, "Matrix contains unequal length input channels."
107
+ end
108
+ data = matrix.flatten.pack('f*')
109
+ FMOD.invoke(:DSPConnection_SetMixMatrix, self, data,
110
+ out_count, in_count, 0)
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,38 @@
1
+
2
+ require_relative 'effects/channel_mix.rb'
3
+ require_relative 'effects/chorus.rb'
4
+ require_relative 'effects/compressor.rb'
5
+ require_relative 'effects/convolution_reverb.rb'
6
+ require_relative 'effects/delay.rb'
7
+ require_relative 'effects/distortion.rb'
8
+ require_relative 'effects/dsps.rb'
9
+ require_relative 'effects/echo.rb'
10
+ require_relative 'effects/envelope_follower.rb'
11
+ require_relative 'effects/fader.rb'
12
+ require_relative 'effects/fft.rb'
13
+ require_relative 'effects/flange.rb'
14
+ require_relative 'effects/high_pass.rb'
15
+ require_relative 'effects/high_pass_simple.rb'
16
+ require_relative 'effects/it_echo.rb'
17
+ require_relative 'effects/it_lowpass.rb'
18
+ require_relative 'effects/ladspa_plugin.rb'
19
+ require_relative 'effects/limiter.rb'
20
+ require_relative 'effects/loudness_meter.rb'
21
+ require_relative 'effects/low_pass.rb'
22
+ require_relative 'effects/low_pass_simple.rb'
23
+ require_relative 'effects/mixer.rb'
24
+ require_relative 'effects/multiband_eq.rb'
25
+ require_relative 'effects/normalize.rb'
26
+ require_relative 'effects/object_pan.rb'
27
+ require_relative 'effects/oscillator.rb'
28
+ require_relative 'effects/pan.rb'
29
+ require_relative 'effects/param_eq.rb'
30
+ require_relative 'effects/pitch_shift.rb'
31
+ require_relative 'effects/return.rb'
32
+ require_relative 'effects/send.rb'
33
+ require_relative 'effects/sfx_reverb.rb'
34
+ require_relative 'effects/three_eq.rb'
35
+ require_relative 'effects/transceiver.rb'
36
+ require_relative 'effects/tremolo.rb'
37
+ require_relative 'effects/vst_plugin.rb'
38
+ require_relative 'effects/winamp_plugin.rb'
@@ -0,0 +1,101 @@
1
+
2
+ module FMOD
3
+ module Effects
4
+
5
+ ##
6
+ # This unit provides per signal channel gain, and output channel mapping to
7
+ # allow 1 multichannel signal made up of many groups of signals to map to a
8
+ # single output signal.
9
+ #
10
+ # @attr output_grouping [Integer] Determines the output mapping.
11
+ #
12
+ # This value will set the output speaker format for the DSP, and also map
13
+ # the incoming channels to the outgoing channels in a round-robin fashion.
14
+ # Use this for example play a 32 channel input signal as if it were a
15
+ # repeating group of output signals.
16
+ #
17
+ # {ALL_MONO} = all incoming channels are mixed to a mono output.
18
+ #
19
+ # {ALL_STEREO} = all incoming channels are mixed to a stereo output, ie
20
+ # even incoming channels 0,2,4,6,etc are mixed to left, and odd incoming
21
+ # channels 1,3,5,7,etc are mixed to right.
22
+ #
23
+ # {ALL_5POINT1} = all incoming channels are mixed to a 5.1 output. If
24
+ # there are less than 6 coming in, it will just fill the first n channels
25
+ # in the 6 output channels. If there are more, then it will repeat the
26
+ # input pattern to the output like it did with the stereo case, ie 12
27
+ # incoming channels are mapped as 0-5 mixed to the 5.1 output and 6 to 11
28
+ # mapped to the 5.1 output.
29
+ #
30
+ # {ALL_LFE} = all incoming channels are mixed to a 5.1 output but via the
31
+ # LFE channel only.
32
+ # * *Default:* {DEFAULT}
33
+ # @see DEFAULT
34
+ # @see ALL_MONO
35
+ # @see ALL_STEREO
36
+ # @see ALL_QUAD
37
+ # @see ALL_5POINT1
38
+ # @see ALL_7POINT1
39
+ # @see ALL_LFE
40
+ class ChannelMix < Dsp
41
+
42
+ ##
43
+ # Output channel count = input channel count.
44
+ # @see SpeakerIndex
45
+ DEFAULT = 0
46
+
47
+ ##
48
+ # Output channel count = 1. Mapping: Mono, Mono, Mono, Mono, Mono,
49
+ # Mono, ... (each channel all the way up to {FMOD::MAX_CHANNEL_WIDTH}
50
+ # channels are treated as if they were mono)
51
+ ALL_MONO = 1
52
+
53
+ ##
54
+ # Output channel count = 2. Mapping: Left, Right, Left, Right, Left,
55
+ # Right, ... (each pair of channels is treated as stereo all the way up to
56
+ # {FMOD::MAX_CHANNEL_WIDTH} channels)
57
+ ALL_STEREO = 2
58
+
59
+ ##
60
+ # Output channel count = 4. Mapping: Repeating pattern of Front Left,
61
+ # Front Right, Surround Left, Surround Right
62
+ ALL_QUAD = 3
63
+
64
+ ##
65
+ # Output channel count = 6. Mapping: Repeating pattern of Front Left,
66
+ # Front Right, Center, LFE, Surround Left, Surround Right.
67
+ ALL_5POINT1 = 4
68
+
69
+ ##
70
+ # Output channel count = 8. Mapping: Repeating pattern of Front Left,
71
+ # Front Right, Center, LFE, Surround Left, Surround Right, Back Left, Back
72
+ # Right.
73
+ ALL_7POINT1 = 5
74
+
75
+ ##
76
+ # Output channel count = 6. Mapping: Repeating pattern of LFE in a 5.1
77
+ # output signal.
78
+ ALL_LFE = 6
79
+
80
+ integer_param(0, :output_grouping, min: 0, max: 6)
81
+
82
+ ##
83
+ # Retrieves the gain for the specified channel.
84
+ # @param channel [Integer] The channel index, clamped between 0 and 31.
85
+ # @return [Float] The gain.
86
+ def [](channel)
87
+ get_float(channel.clamp(0, 31) + 1)
88
+ end
89
+
90
+ ##
91
+ # Sets the gain, in dB for the specified channel.
92
+ # @param channel [Integer] The channel index, clamped between 0 and 31.
93
+ # @param gain [Float] The gain, in dB, clamped between -80.0 and 10.0.
94
+ # @return [Float] The gain.
95
+ def []=(channel, gain)
96
+ set_float(channel.clamp(0, 31) + 1, gain.clamp(-80.0, 10.0))
97
+ gain
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,30 @@
1
+
2
+ module FMOD
3
+ module Effects
4
+
5
+ ##
6
+ # This unit produces a chorus effect on the sound.
7
+ #
8
+ # Chorus is an effect where the sound is more "spacious" due to 1 to 3
9
+ # versions of the sound being played along side the original signal but with
10
+ # the pitch of each copy modulating on a sine wave.
11
+ #
12
+ # @attr mix [Float] Volume of original signal to pass to output.
13
+ # * *Minimum:* 0.0
14
+ # * *Maximum:* 100.0
15
+ # * *Default:* 50.0
16
+ # @attr rate [Float] Chorus modulation rate in Hz.
17
+ # * *Minimum:* 0.0
18
+ # * *Maximum:* 20.0
19
+ # * *Default:* 0.8
20
+ # @attr depth [Float] Chorus modulation depth.
21
+ # * *Minimum:* 0.0
22
+ # * *Maximum:* 100.0
23
+ # * *Default:* 3.0
24
+ class Chorus < Dsp
25
+ float_param(0, :mix, min: 0.0, max: 100.0)
26
+ float_param(1, :rate, min: 0.0, max: 20.0)
27
+ float_param(2, :depth, min: 0.0, max: 100.0)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,52 @@
1
+ module FMOD
2
+ module Effects
3
+
4
+ ##
5
+ # This unit implements dynamic compression (linked/unlinked multichannel, wide-band).
6
+ #
7
+ # @attr threshold [Float] Threshold level (dB).
8
+ # * *Minimum:* -80.0
9
+ # * *Maximum:* 0.0
10
+ # * *Default:* 0.0
11
+ # @attr ratio [Float] Compression Ratio (dB/dB).
12
+ # * *Minimum:* 1.0
13
+ # * *Maximum:* 50.0
14
+ # * *Default:* 2.5
15
+ # @attr attack [Float] Attack time (milliseconds).
16
+ # * *Minimum:* 0.1
17
+ # * *Maximum:* 1000.0
18
+ # * *Default:* 20.0
19
+ # @attr release_time [Float] Release time (milliseconds).
20
+ # * *Minimum:* 10.0
21
+ # * *Maximum:* 5000.0
22
+ # * *Default:* 100.0
23
+ # @attr make_up_gain [Float] Make-up gain (dB) applied after limiting.
24
+ # * *Minimum:* 0.0
25
+ # * *Maximum:* 30.0
26
+ # * *Default:* 0.0
27
+ # @attr use_sidechain [Boolean] Whether to analyse the sidechain signal
28
+ # instead of the input signal.
29
+ # * *Default:* +false+
30
+ # @attr linked [Boolean]
31
+ # * *true:* Linked
32
+ # * *false:* Independent (compressor per channel)
33
+ # * *Default:* +false+
34
+ class Compressor < Dsp
35
+ float_param(0, :threshold, min: -60.0, mix: 0.0)
36
+ float_param(1, :ratio, min: 1.0, max: 50.0)
37
+ float_param(2, :attack, min: 0.1, max: 500.0)
38
+ float_param(3, :release_time, min: 10.0, max: 5000.0)
39
+ float_param(4, :make_up_gain, min: -30.0, max: 30.0)
40
+ bool_param(6, :linked)
41
+
42
+ def sidechain
43
+ get_data(5).to_s(SIZEOF_INT).unpack1('l') != 0
44
+ end
45
+
46
+ def sidechain=(bool)
47
+ value = [bool.to_i].pack('l')
48
+ set_data(5, value)
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,31 @@
1
+ module FMOD
2
+ module Effects
3
+
4
+ ##
5
+ # This unit implements convolution reverb.
6
+ #
7
+ # @attr_writer ir [Pointer|String] Array of signed 16-bit (short) PCM data
8
+ # to be used as reverb IR. First member of the array should be a 16-bit
9
+ # value (short) which specifies the number of channels. Array looks like
10
+ # [index 0 = channel_count][index 1+ = raw 16-bit PCM data].
11
+ #
12
+ # Data is copied internally so source can be freed.
13
+ # @attr wet [Float] Volume of echo signal to pass to output in dB.
14
+ # * *Minimum:* -80.0
15
+ # * *Maximum:* 10.0
16
+ # * *Default:* 0.0
17
+ # @attr dry [Float] Original sound volume in dB.
18
+ # * *Minimum:* -80.0
19
+ # * *Maximum:* 10.0
20
+ # * *Default:* 0.0
21
+ # @attr linked [Boolean] Indicates if channels are mixed together before
22
+ # processing through the reverb.
23
+ # * *Default:* +true+
24
+ class ConvolutionReverb < Dsp
25
+ data_param(0, :ir, write_only: true)
26
+ float_param(1, :wet, min: -80.0, max: 10.0)
27
+ float_param(2, :dry, min: -80.0, max: 10.0)
28
+ bool_param(3, :linked)
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,44 @@
1
+
2
+ module FMOD
3
+ module Effects
4
+
5
+ ##
6
+ # This unit produces different delays on individual channels of the sound.
7
+ #
8
+ # @note Every time MaxDelay is changed, the plugin re-allocates the delay
9
+ # buffer. This means the delay will disappear at that time while it
10
+ # refills its new buffer.
11
+ #
12
+ # A larger {#max_delay} results in larger amounts of memory allocated.
13
+ #
14
+ # Channel delays above {#max_delay} will be clipped to MaxDelay and the
15
+ # delay buffer will not be re-sized.
16
+ #
17
+ # @attr max_delay [Float] Maximum delay in ms.
18
+ # * *Minimum:* 0.0
19
+ # * *Maximum:* 10000.0
20
+ # * *Default:* 10.0
21
+ class Delay < Dsp
22
+
23
+ ##
24
+ # Retrieves the delay, in ms, for the specified channel.
25
+ # @param channel [Integer] The channel index to retrieve (0 to 15).
26
+ # @return [Float]
27
+ def [](channel)
28
+ get_float(channel.clamp(0, 15))
29
+ end
30
+
31
+ ##
32
+ # Sets the delay, in ms, for the specified channel.
33
+ # @param channel [Integer] The channel index to set (0 to 15).
34
+ # @param delay [Float] The delay value, clamped between 0.0 and 10000.0.
35
+ # @return [Float] The delay.
36
+ def []=(channel, delay)
37
+ set_float(channel.clamp(0, 15), delay.clamp(0.0, 10000.0))
38
+ delay
39
+ end
40
+
41
+ integer_param(16, :max_delay, min: 0.0, max: 10000.0)
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,16 @@
1
+
2
+ module FMOD
3
+ module Effects
4
+
5
+ ##
6
+ # This unit distorts the sound.
7
+ #
8
+ # @attr distortion [Float] Distortion value.
9
+ # * *Minimum:* 0.0
10
+ # * *Maximum:* 1.0
11
+ # * *Default:* 0.5
12
+ class Distortion < Dsp
13
+ float_param(0, :distortion, min: 0.0, max: 1.0)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,10 @@
1
+ module FMOD
2
+ module Effects
3
+
4
+
5
+
6
+
7
+ ###### TODO: MultibandE1 low and high pass examples
8
+
9
+ end
10
+ end
@@ -0,0 +1,37 @@
1
+
2
+ module FMOD
3
+ module Effects
4
+
5
+ ##
6
+ # This unit produces an echo on the sound and fades out at the desired rate.
7
+ #
8
+ # @note Every time the delay is changed, the plugin re-allocates the echo
9
+ # buffer. This means the echo will disappear at that time while it refills
10
+ # its new buffer.
11
+ #
12
+ # Larger echo delays result in larger amounts of memory allocated.
13
+ #
14
+ # @attr delay [Float] Echo delay in ms.
15
+ # * *Minimum:* 10.0
16
+ # * *Maximum:* 5000.0
17
+ # * *Default:* 500.0
18
+ # @attr feedback [Float] Echo decay per delay.
19
+ # * *Minimum:* 0.0 (total decay)
20
+ # * *Maximum:* 100.0 (no decay)
21
+ # * *Default:* 50.0
22
+ # @attr dry_level [Float] Original sound volume in dB.
23
+ # * *Minimum:* -80.0
24
+ # * *Maximum:* 10.0
25
+ # * *Default:* 0.0
26
+ # @attr wet_level [Float] Volume of echo signal to pass to output in dB.
27
+ # * *Minimum:* -80.0
28
+ # * *Maximum:* 10.0
29
+ # * *Default:* 0.0
30
+ class Echo < Dsp
31
+ float_param(0, :delay, min: 10.0, max: 5000.0)
32
+ float_param(1, :feedback, min: 0.0, max: 100.0)
33
+ float_param(2, :dry_level, min: -80.0, max: 10.0)
34
+ float_param(3, :wet_level, min: -80.0, max: 10.0)
35
+ end
36
+ end
37
+ end