Class: FMOD::Effects::Transceiver

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

Overview

This unit “sends” and “receives” from a selection of up to 32 different slots. It is like a send/return but it uses global slots rather than returns as the destination. It also has other features. Multiple transceivers can receive from a single channel, or multiple transceivers can send to a single channel, or a combination of both.

The transceiver only transmits and receives to a global array of 32 channels. The transceiver can be set to receiver mode (like a Return) and can receive the signal at a variable #gain. The transceiver can also be set to transmit to a channel (like a Send) and can transmit the signal with a variable #gain.

The #speaker_mode is only applicable to the transmission format, not the receive format. This means this parameter is ignored in “receive mode”. This allows receivers to receive at the speaker mode of the user’s choice. Receiving from a mono channel, is cheaper than receiving from a surround channel for example. The 3 speaker modes Core::SpeakerMode::MONO, Core::SpeakerMode::STEREO, Core::SpeakerMode::SURROUND are stored as separate buffers in memory for a transmitter channel. To save memory, use 1 common speaker mode for a transmitter.

The transceiver is double buffered to avoid de-syncing of transmitters and receivers. This means there will be a 1 block delay on a receiver, compared to the data sent from a transmitter.

Multiple transmitters sending to the same channel will be mixed together.

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

Method Summary

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

#channelInteger

Integer to select current global slot, shared by all Transceivers, that can be transmitted to or received from.

  • Minimum: 0

  • Maximum: 31

  • Default: 0

Returns:

  • (Integer)

    the current value of channel



50
51
52
# File 'lib/fmod/effects/transceiver.rb', line 50

def channel
  @channel
end

#gainFloat

Gain to receive or transmit at in dB.

  • Minimum: -80.0

  • Maximum: 10.0

  • Default: 0.0

Returns:

  • (Float)

    the current value of gain



50
51
52
# File 'lib/fmod/effects/transceiver.rb', line 50

def gain
  @gain
end

#speaker_modeInteger

Speaker mode (transmitter mode only).

Returns:

  • (Integer)

    the current value of speaker_mode

See Also:



50
51
52
# File 'lib/fmod/effects/transceiver.rb', line 50

def speaker_mode
  @speaker_mode
end

#transmitBoolean

The behavior of the unit.

  • false: Transceiver is a “receiver” (like a Return) and accepts data from a channel.

  • true: Transceiver is a “transmitter” (like a Send).

  • Default: false

Returns:

  • (Boolean)

    the current value of transmit



50
51
52
# File 'lib/fmod/effects/transceiver.rb', line 50

def transmit
  @transmit
end