AKTuningTableBase

@objc
open class AKTuningTableBase : NSObject

AKTuningTableBase provides low-level methods for creating arbitrary mappings of midi note numbers to musical frequencies The default behavior is 12-tone equal temperament so we can integrate in non-microtonal settings with backwards compatibility

  • For clarity, typealias Frequency as a Double

    Declaration

    Swift

    public typealias Frequency = Double
  • For clarify, typealias Cents as a Double. Cents = 1200 * log2(Frequency)

    Declaration

    Swift

    public typealias Cents = Double
  • Standard Nyquist frequency

    Declaration

    Swift

    public static let NYQUIST: AKTuningTableBase.Frequency
  • Total number of MIDI Notes available to play

    Declaration

    Swift

    @objc
    public static let midiNoteCount: Int
  • Initialization for standard default 12 tone equal temperament

    Declaration

    Swift

    @objc
    public override init()
  • npo

    Notes Per Octave: The count of the frequency array

    Declaration

    Swift

    @objc
    public var npo: Int { get }
  • Return the Frequency for the given MIDINoteNumber

    Declaration

    Swift

    @objc
    public func frequency(forNoteNumber noteNumber: MIDINoteNumber) -> Frequency
  • Set frequency of a given note number

    Declaration

    Swift

    @objc
    public func setFrequency(_ frequency: Frequency, at noteNumber: MIDINoteNumber)