AudioKit

@objc
open class AudioKit : NSObject

Top level AudioKit managing class

  • Reference to the AV Audio Engine

    Declaration

    Swift

    @objc
    public static let engine: AVAudioEngine
  • Reference to singleton MIDI

    Declaration

    Swift

    public static let midi: AKMIDI
  • An audio output operation that most applications will need to use last

    Declaration

    Swift

    @objc
    public static var output: AKNode? { get set }
  • Enumerate the list of available devices.

  • Enumerate the list of available input devices.

    Declaration

    Swift

    @objc
    public static var inputDevices: [AKDevice]? { get }
  • Enumerate the list of available output devices.

    Declaration

    Swift

    @objc
    public static var outputDevices: [AKDevice]? { get }
  • The name of the current input device, if available.

    Declaration

    Swift

    @objc
    public static var inputDevice: AKDevice? { get }
  • The name of the current output device, if available.

    Declaration

    Swift

    @objc
    public static var outputDevice: AKDevice? { get }
  • Change the preferred input device, giving it one of the names from the list of available inputs.

    Declaration

    Swift

    @objc
    public static func setInputDevice(_ input: AKDevice) throws
  • Change the preferred output device, giving it one of the names from the list of available output.

    Declaration

    Swift

    @objc
    public static func setOutputDevice(_ output: AKDevice) throws
  • Disconnect all inputs

    Declaration

    Swift

    @objc
    public static func disconnectAllInputs()
  • Declaration

    Swift

    @objc
    public static func connect(_ sourceNode: AVAudioNode,
                             to destNodes: [AVAudioConnectionPoint],
                             fromBus sourceBus: AVAudioNodeBus,
                             format: AVAudioFormat?)
  • Declaration

    Swift

    @objc
    public static func connect(_ node1: AVAudioNode,
                             to node2: AVAudioNode,
                             fromBus bus1: AVAudioNodeBus,
                             toBus bus2: AVAudioNodeBus,
                             format: AVAudioFormat?)
  • Declaration

    Swift

    @objc
    public static func connect(_ node1: AVAudioNode, to node2: AVAudioNode, format: AVAudioFormat?)
  • Declaration

    Swift

    @objc
    public static func detach(nodes: [AVAudioNode])
  • Render output to an AVAudioFile for a duration.

    - Parameters:
        - audioFile: An file initialized for writing
        - duration: Duration to render, in seconds
        - prerender: A closure called before rendering starts, use this to start players, set initial parameters, etc...
    

    Declaration

    Swift

    @available(iOS 11, OSX 10.13, tvOS 11, *)
    @objc
    public static func renderToFile(_ audioFile: AVAudioFile, duration: Double, prerender: (() -> Void)? = nil) throws
  • Declaration

    Swift

    public static func printConnections()
  • Start up the audio engine with periodic functions

    Declaration

    Swift

    public static func start(withPeriodicFunctions functions: AKPeriodicFunction...) throws
  • Start up the audio engine

    Declaration

    Swift

    @objc
    public static func start() throws
  • Stop the audio engine

    Declaration

    Swift

    @objc
    public static func stop() throws
  • Format of AudioKit Nodes

    Declaration

    Swift

    @objc
    public static var format: AVAudioFormat
  • Testing AKNode

    Declaration

    Swift

    @objc
    public static var tester: AKTester?
  • Test the output of a given node

    Declaration

    Swift

    @objc
    public static func test(node: AKNode, duration: Double, afterStart: () -> Void = {}) throws

    Parameters

    node

    AKNode to test

    duration

    Number of seconds to test (accurate to the sample)

  • Audition the test to hear what it sounds like

    Declaration

    Swift

    @objc
    public static func auditionTest(node: AKNode, duration: Double) throws

    Parameters

    node

    AKNode to test

    duration

    Number of seconds to test (accurate to the sample)