Skip to content

Effect API

The effect API defines the bridge between your effects and Audectra. Use it to create renders, particle systems or wave simulations.

The effect API implements the following interface.

/// <summary>
/// Helper class to simplify effect generation and 
/// build a bridge between your effect and Audectra.
/// </summary>
public interface IEffectApi
{
    /// <summary>
    /// Create an empty render for your effect.
    /// </summary>
    /// <returns>Empty render</returns>
    IRender CreateRender();

    /// <summary>
    /// Create a new random color with full saturation
    /// and full brightness.
    /// </summary>
    /// <returns>new random color</returns>
    SKColor CreateRandomColor();

    /// <summary>
    /// Create an empty particle system for your effect.
    /// </summary>
    /// <returns>Empty particle system</returns>
    IParticleSystem CreateParticleSystem();

    /// <summary>
    /// Create a new 1D wave simulation. 
    /// </summary>
    /// <returns>1D wave simulation</returns>
    IWaveSimulation1D CreateWaveSimulation1D();

    /// <summary>
    /// Create an audio feature cache, which holds and updates a
    /// set of audio features.
    /// </summary>
    /// <returns>Audio feature cache</returns>
    IAudioFeatureCache CreateAudioFeatureCache();
}

Read more: