Class: FMOD::Effects::Compressor

Inherits:
Dsp
  • Object
show all
Defined in:
lib/fmod/effects/compressor.rb

Overview

This unit implements dynamic compression (linked/unlinked multichannel, wide-band).

Instance Attribute Summary collapse

Attributes inherited from Dsp

#active, #bypass, #channel_format, #input_count, #output_count, #parameter_count, #parent, #type, #wet_dry_mix

Attributes inherited from Handle

#user_data

Instance Method Summary collapse

Methods inherited from Dsp

#[], #[]=, #add_input, bool_param, data_param, #disconnect, #disconnect_from, #enable_metering, float_param, from_handle, #get_bool, #get_data, #get_float, #get_integer, #idle?, #info, #input, #input_connection, #input_metering?, integer_param, #name, #output, #output_connection, #output_format, #output_metering?, #param_info, #play, #reset, #set_bool, #set_data, #set_float, #set_integer, #set_wet_dry_mix, #show_dialog, #to_s, type_map, #version

Methods inherited from Handle

#initialize, #int_ptr, #release, #to_s

Constructor Details

This class inherits a constructor from FMOD::Handle

Instance Attribute Details

#attackFloat

Attack time (milliseconds).

  • Minimum: 0.1

  • Maximum: 1000.0

  • Default: 20.0

Returns:

  • (Float)

    the current value of attack



34
35
36
# File 'lib/fmod/effects/compressor.rb', line 34

def attack
  @attack
end

#linkedBoolean

  • true: Linked

  • false: Independent (compressor per channel)

  • Default: false

Returns:

  • (Boolean)

    the current value of linked



34
35
36
# File 'lib/fmod/effects/compressor.rb', line 34

def linked
  @linked
end

#make_up_gainFloat

Make-up gain (dB) applied after limiting.

  • Minimum: 0.0

  • Maximum: 30.0

  • Default: 0.0

Returns:

  • (Float)

    the current value of make_up_gain



34
35
36
# File 'lib/fmod/effects/compressor.rb', line 34

def make_up_gain
  @make_up_gain
end

#ratioFloat

Compression Ratio (dB/dB).

  • Minimum: 1.0

  • Maximum: 50.0

  • Default: 2.5

Returns:

  • (Float)

    the current value of ratio



34
35
36
# File 'lib/fmod/effects/compressor.rb', line 34

def ratio
  @ratio
end

#release_timeFloat

Release time (milliseconds).

  • Minimum: 10.0

  • Maximum: 5000.0

  • Default: 100.0

Returns:

  • (Float)

    the current value of release_time



34
35
36
# File 'lib/fmod/effects/compressor.rb', line 34

def release_time
  @release_time
end

#thresholdFloat

Threshold level (dB).

  • Minimum: -80.0

  • Maximum: 0.0

  • Default: 0.0

Returns:

  • (Float)

    the current value of threshold



34
35
36
# File 'lib/fmod/effects/compressor.rb', line 34

def threshold
  @threshold
end

#use_sidechainBoolean

Whether to analyse the sidechain signal instead of the input signal.

  • Default: false

Returns:

  • (Boolean)

    the current value of use_sidechain



34
35
36
# File 'lib/fmod/effects/compressor.rb', line 34

def use_sidechain
  @use_sidechain
end

Instance Method Details

#sidechainObject



42
43
44
# File 'lib/fmod/effects/compressor.rb', line 42

def sidechain
  get_data(5).to_s(SIZEOF_INT).unpack1('l') != 0
end

#sidechain=(bool) ⇒ Object



46
47
48
49
# File 'lib/fmod/effects/compressor.rb', line 46

def sidechain=(bool)
  value = [bool.to_i].pack('l')
  set_data(5, value)
end