AKSequencerTrack

open class AKSequencerTrack : AKNode, AKComponent

Audio player that loads a sample into memory

  • Declaration

    Swift

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

    Declaration

    Swift

    public static let ComponentDescription: AudioComponentDescription
  • Declaration

    Swift

    public var targetNode: AKNode?
  • Ramp Duration represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc
    open dynamic var rampDuration: Double { get set }
  • Length of the track in beats

    Declaration

    Swift

    public var length: Double { get set }
  • Speed of the track in beats per minute

    Declaration

    Swift

    public var tempo: BPM { get set }
  • Maximum number of times to play, ie. loop the track

    Declaration

    Swift

    public var maximumPlayCount: Double { get set }
  • Is looping enabled?

    Declaration

    Swift

    public var loopEnabled: Bool { get set }
  • Is the track currently playing?

    Declaration

    Swift

    public var isPlaying: Bool { get }
  • Current position of the track

    Declaration

    Swift

    public var currentPosition: Double { get }
  • Initialize the track

    Declaration

    Swift

    @objc
    public override init()
  • Initialize the track with a target node

    Declaration

    Swift

    @objc
    public convenience init(targetNode: AKNode)
  • Set the target node

    Declaration

    Swift

    public func setTarget(node: AKNode)
  • Start the track

    Declaration

    Swift

    public func play()
  • Start the track from the beginning

    Declaration

    Swift

    public func playFromStart()
  • Start the track after a certain delay in beats

    Declaration

    Swift

    public func playAfterDelay(beats: Double)
  • Stop playback

    Declaration

    Swift

    public func stop()
  • Set the current position to the start ofthe track

    Declaration

    Swift

    public func rewind()
  • Move to a position in the track

    Declaration

    Swift

    public func seek(to position: Double)
  • Add a MIDI note to the track

    Declaration

    Swift

    open func add(noteNumber: MIDINoteNumber,
                  velocity: MIDIVelocity = 127,
                  channel: MIDIChannel = 0,
                  position: Double,
                  duration: Double)
  • Add MIDI data to the track as an event

    Declaration

    Swift

    open func add(status: AKMIDIStatus, data1: UInt8, data2: UInt8, position: Double)
  • Add a MIDI event to the track at a specific position

    Declaration

    Swift

    open func add(event: AKMIDIEvent, position: Double)
  • Remove the notes in the track

    Declaration

    Swift

    open func clear()
  • Stop playing all the notes current in the now playing array.

    Declaration

    Swift

    open func stopPlayingNotes()