c4d.SoundEffectorData
¶
New in version R19.
Sound effector data type (
CUSTOMDATATYPE_SOUNDEFFECTOR
) for
SoundEffectorCustomGui
.
c4d.
SoundEffectorData
¶
SoundEffectorData.CreateProbe()
SoundEffectorData.GetProbeCount()
SoundEffectorData.GetProbe()
SoundEffectorData.SetProbe()
SoundEffectorData.DeleteProbe()
SoundEffectorData.UpdateProbeOrder()
c4d.CustomDataType
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: |
|
---|---|
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:
|
SoundEffectorData.
SetProbe
(
index
,
probe
)
¶
Sets the probe at the specified index .
Parameters: |
|
---|
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: |
|
---|
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: |
|
---|---|
Return type: |
tuple(float,
|
Returns: |
A tuple with the output value and color. |
SoundEffectorData.
SetActiveSoundTrack
(
track
,
doc
)
¶
Sets the active sound track.
Parameters: |
|
---|---|
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 . |