c4d.SoundEffectorData

New in version R19.

Sound effector data type ( CUSTOMDATATYPE_SOUNDEFFECTOR ) for SoundEffectorCustomGui .

Definition

class c4d. SoundEffectorData

Inheritance

Members

SoundEffectorData. __init__ ( [ v ] )

Creates a c4d.SoundEffectorData .

Parameters: v ( c4d.SoundEffectorData ) – An optional c4d.SoundEffectorData to copy.
Return type: c4d.SoundEffectorData
Returns: The new SoundEffectorData .
SoundEffectorData. CreateProbe ( left , right , top , bottom [ , selected=False ] )

Creates a probe.

Parameters:
  • left – The left side of the probe in Hertz [1,22050] .
  • right – The right side of the probe in Hertz [1,22050] .
  • top – The top edge of the probe in the range [0,1] .
  • bottom – The bottom edge of the probe in the range [0,1] .
  • selected True to select the created probe. Other probes are not deselected in the operation.
Return type:

int

Returns:

The created probe’s index.

SoundEffectorData. GetProbeCount ( )

Retrieves the number of probes owned by the sound effector data.

Return type: int
Returns: The probe count.
SoundEffectorData. GetProbe ( index )

Retrieves the probe at the specified index .

Parameters: index ( int ) – The probe index.
Return type: dict
Returns: The probe, or None if the function fails. The dictionary contains the following data:
left float The left value of probe in Hertz.
right float The right value of probe in Hertz.
top float The top value of probe in Hertz.
bottom float The bottom value of probe in Hertz.
strength float The overall strength multiplier for the probe.
clamp bool True limits the output of the probe from 0.0 to 1.0 and ignores values outside of the range.
samplingMode int The probe mode.
colorMode int The color mode.
color c4d.Vector The color of the probe used when colorMode is Custom Color.
gradient c4d.Gradient The gradient of the probe used when colorMode is Custom Gradient.
SoundEffectorData. SetProbe ( index , probe )

Sets the probe at the specified index .

Parameters:
  • index ( int ) – The index of the probe to set.
  • probe ( dict ) –

    The probe data to set:

    left float The left value of probe in Hertz.
    right float The right value of probe in Hertz.
    top float The top value of probe in Hertz.
    bottom float The bottom value of probe in Hertz.
    strength float The overall strength multiplier for the probe.
    clamp bool Set to True to limit the output of the probe from 0.0 to 1.0 and to ignore values outside of the range.
    samplingMode int The probe mode.
    colorMode int The color mode.
    color c4d.Vector The color of the probe used when colorMode is Custom Color.
    gradient c4d.Gradient The gradient of the probe used when colorMode is Custom Gradient.
SoundEffectorData. DeleteProbe ( index )

Deletes the probe at the specified index .

Parameters: index ( int ) – The index of the probe to delete.
Return type: bool
Returns: True if successful, otherwise False .
SoundEffectorData. UpdateProbeOrder ( )

Updates the probes.

Note

Must be called after adjusting any probes left or right values to update the order that the probes are calculated in.

SoundEffectorData. GetRange ( )

Retrieves the range of the sound effector data.

Warning

Only valid if the data is shown in the sound sound effector GUI.

Return type: tuple(float, float, float, float)
Returns: A tuple with the left, right, top and bottom values.
SoundEffectorData. SetRange ( left , right , top , bottom )

Sets the range of the sound effector data.

Warning

Only valid if the data is shown in the sound effector GUI.

Parameters:
  • left ( float ) – The left value to set.
  • right ( float ) – The right value to set.
  • top ( float ) – The top value to set.
  • bottom ( float ) – The bottom value to set.
SoundEffectorData. GetLinLog ( )

Retrieves the blend value for the linear/logarithmic slider.

Return type: float
Returns: The blend percentage: 0% = linear, 100% = log10.
SoundEffectorData. SetLinLog ( value )

Sets the the blend value for the linear/logarithmic slider.

Parameters: value ( float ) – The blend percentage to set: 0% = linear, 100% = log10.
SoundEffectorData. GetFreeze ( )

Retrieves the freeze state.

Return type: bool
Returns: True if freeze is enabled, otherwise False .
SoundEffectorData. SetFreeze ( freeze )

Sets the freeze state.

Parameters: freeze ( bool ) – True to enable freeze, otherwise False .
SoundEffectorData. GetGradient ( )

Retrieves the global gradient.

Return type: c4d.Gradient
Returns: The global gradient, or None if the function fails.
SoundEffectorData. GetGradientDirection ( )

Retrieves the global gradient direction.

Return type: int
Returns: The global gradient direction: 0 for vertical (volume), 1 for horizontal (frequency).
SoundEffectorData. SetGradientDirection ( direction )

Sets the global gradient direction.

Parameters: direction ( int ) – The global gradient direction to set: 0 for vertical (volume), 1 for horizontal (frequency).
SoundEffectorData. InitSampling ( doc )

Initializes the sampling functionality of the sound effector data.

Note

Must be called before Sample() . FreeSampling() must be invoked afterwards.

Parameters: doc ( c4d.BaseDocument ) – The document for the operation.
Return type: bool
Returns: True if successful, otherwise False .
SoundEffectorData. FreeSampling ( )

Frees the memory used for sampling.

Note

Must be invoked after InitSampling() has been called.

Return type: bool
Returns: True if successful, otherwise False .
SoundEffectorData. Sample ( index , count )

Samples the sound file using the probes.

Parameters:
  • index ( int ) – The index of the element to sample.
  • count ( int ) – The number of elements in the array being sampled.
Return type:

tuple(float, c4d.Vector )

Returns:

A tuple with the output value and color.

SoundEffectorData. SetActiveSoundTrack ( track , doc )

Sets the active sound track.

Parameters:
  • track ( c4d.CTrack ) – The sound track to set.
  • doc ( c4d.BaseDocument ) – The document for the operation.
Return type:

bool

Returns:

True if successful, otherwise False .

SoundEffectorData. GetActiveSoundTrack ( doc )

Retrieves the active sound track.

Parameters: doc ( c4d.BaseDocument ) – The document for the operation.
Return type: c4d.CTrack
Returns: The active sound track, or None if the function fails.
SoundEffectorData. CopyTo ( dest )

Copies the sound effector data.

Parameters: dest ( c4d.SoundEffectorData ) – The destination sound effector data.
Return type: bool
Returns: True if successful, otherwise False .

Table Of Contents