Class: FMOD::Core::FloatDescription

Inherits:
Structure
  • Object
show all
Defined in:
lib/fmod/core/float_description.rb

Overview

Structure describing a float parameter for a DSP unit.

Constant Summary collapse

LINEAR =

Values mapped linearly across range.

0
AUTO =

A mapping is automatically chosen based on range and units.

1
PIECEWISE_LINEAR =

Values mapped in a piecewise linear fashion.

2

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Structure

#inspect, #names, #values

Constructor Details

#initialize(address = nil) ⇒ FloatDescription

Returns a new instance of FloatDescription.

Parameters:

  • address (Pointer, Integer, String, nil) (defaults to: nil)

    The address in memory where the structure will be created from. If no address is given, new memory will be allocated.



24
25
26
27
28
# File 'lib/fmod/core/float_description.rb', line 24

def initialize(address = nil)
  types = [TYPE_FLOAT, TYPE_FLOAT, TYPE_FLOAT, TYPE_INT]
  members = [:min, :max, :default, :mapping]
  super(address, types, members)
end

Instance Attribute Details

#defaultFloat

Returns the default parameter value.

Returns:

  • (Float)

    the default parameter value.



# File 'lib/fmod/core/float_description.rb', line 36

#mappingInteger

Value indicating how the values are distributed across dials and automation curves (e.g. linearly, exponentially etc).

Will be one of the following values:

Returns:

  • (Integer)

    the mapping type.



49
50
51
# File 'lib/fmod/core/float_description.rb', line 49

[:min, :max, :default, :mapping].each do |symbol|
  define_method(symbol) { self[symbol] }
end

#maxFloat

Returns the maximum parameter value.

Returns:

  • (Float)

    the maximum parameter value.



# File 'lib/fmod/core/float_description.rb', line 33

#minFloat

Returns the minimum parameter value.

Returns:

  • (Float)

    the minimum parameter value.



# File 'lib/fmod/core/float_description.rb', line 30