AKOperationGenerator

open class AKOperationGenerator : AKNode, AKToggleable, AKComponent

Operation-based generator

  • Declaration

    Swift

    public typealias AKAudioUnitType = AKOperationGeneratorAudioUnit
  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription: AudioComponentDescription
  • Tells whether the node is processing (ie. started, playing, or active)

    Declaration

    Swift

    @objc
    open dynamic var isStarted: Bool { get }
  • Sporth language snippet

    Declaration

    Swift

    @objc
    open dynamic var sporth: String { get set }
  • Parameters for changing internal operations

    Declaration

    Swift

    @objc
    open dynamic var parameters: [Double] { get set }
  • Initialize with a mono or stereo operation

    Declaration

    Swift

    public convenience init(operation: ([AKOperation]) -> AKComputedParameter)

    Parameters

    operation

    Operation to generate, can be mono or stereo

  • Initialize the generator for stereo (2 channels)

    Declaration

    Swift

    public convenience init(channelCount: Int, operations: ([AKOperation]) -> [AKOperation])

    Parameters

    channelCount

    Only 2 channels are supported, but need to differentiate the initializer

    operations

    Array of operations [left, right]

  • Initialize this generator node with a generic sporth stack and a triggering flag

    Declaration

    Swift

    @objc
    public init(sporth: String, customUgens: [AKCustomUgen] = [])

    Parameters

    sporth

    String of valid Sporth code

  • Trigger the sound with current parameters

    Declaration

    Swift

    open func trigger(_ triggerNumber: Int = 0)
  • Function to start, play, or activate the node, all do the same thing

    Declaration

    Swift

    @objc
    open func start()
  • Function to stop or bypass the node, both are equivalent

    Declaration

    Swift

    @objc
    open func stop()
  • Restart from scratch

    Declaration

    Swift

    open func restart()