Sound Effect

Format

{
  "Type": "SoundEffect",
  "Config": {
    "UseAverage": <bool>,
    "MinimumFrequency": <int>,
    "MaximumFrequency": <int>,
    "ScalingStrategy": <enum>,
    "ScalingFactor": <float>,
    "ColorGradient": <LedColorGradient>,

    "ColorGenerationMethod": <enum>,
    "Trigger": <Trigger>
  }
}

Variables

UseAverage

Determines if FFT values are averaged.

Required: No
Default value:

true

Example:

"UseAverage": false

MinimumFrequency

Mimimum frequency for FFT.

Required: No
Default value:

100

Example:

"MinimumFrequency": 1000

MaximumFrequency

Maximum frequency for FFT.

Required: No
Default value:

10000

Example:

"MaximumFrequency": 12000

ScalingStrategy

FFT value scaling function.

Allowed values: "Decibel", "Linear", "Sqrt"

Required: No
Default value:

"Sqrt"

Example:

"ScalingStrategy": "Decibel"

ScalingFactor

FFT scaling scaling factor.

Note: Used for "Linear" and "Sqrt" ScalingStrategy.

Required: No
Default value:

2.0

Example:

"ScalingFactor": 4.0

ColorGradient

A Led Color Gradient to translate FFT values to led colors.

Note: The gradient <location> values are FFT values from 0.0 to 1.0.

Required: Yes
Default value:

[]

Example:

"ColorGradient": [
  [0.0, [0, 0, 0]],
  [0.75, [255, 255, 255]],
  [1.0, [255, 0, 0]]
]

ColorGenerationMethod

Tells the effect how to generate colors for multiple devices. The actual behaviour is depended on the effect implementation.

Allowed values:

  • "PerPort" - Duplicates the effect on each device.
  • "SpanPorts" - Treats multiple devices as one.

Required: No
Default value:

"PerPort"

Example:

"ColorGenerationMethod": "SpanPorts"

Trigger

Instance of a Trigger plugin.

Required: Yes
Default value:

Example:

"Trigger": {
  "Type": "AlwaysTrigger"
}

Example