AKMandolin

open class AKMandolin : AKNode, AKComponent

Physical model of a 4 course mandolin

  • Declaration

    Swift

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

    Declaration

    Swift

    public static let ComponentDescription: AudioComponentDescription
  • Ramp Duration represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc
    open dynamic var rampDuration: Double { get set }
  • Detuning of second string in the course (1=Unison (deault), 2=Octave)

    Declaration

    Swift

    @objc
    open dynamic var detune: Double { get set }
  • Relative size of the mandoline (Default: 1, ranges ~ 0.5 - 2)

    Declaration

    Swift

    @objc
    open dynamic var bodySize: Double { get set }
  • Initialize the 4 course (string-pair) Mandolin

    Declaration

    Swift

    @objc
    public init(
        detune: Double = 1,
        bodySize: Double = 1)

    Parameters

    detune

    Detuning of second string in the course (1=Unison (deault), 2=Octave)

    bodySize

    Relative size of the mandoline (Default: 1, ranges ~ 0.5 - 2)

  • Virutally pressing fingers on all the strings of the mandolin

    Declaration

    Swift

    open func prepareChord(_ course1Note: MIDINoteNumber,
                           _ course2Note: MIDINoteNumber,
                           _ course3Note: MIDINoteNumber,
                           _ course4Note: MIDINoteNumber)

    Parameters

    course1Note

    MIDI note number for course 1

    course2Note

    MIDI note number for course 2

    course3Note

    MIDI note number for course 3

    course4Note

    MIDI note number for course 4

  • Pressing a finger on a course of the mandolin

    Declaration

    Swift

    open func fret(noteNumber: MIDINoteNumber, course: Int)

    Parameters

    noteNumber

    MIDI note number of fretted note

    course

    Which set of strings to press

  • Pluck an individual course

    Declaration

    Swift

    open func pluck(course: Int, position: Double, velocity: MIDIVelocity)

    Parameters

    course

    Which set of string parirs to pluck

    position

    Position lengthwise along the string to pluck (0 - 1)

    velocity

    MIDI Velocity as an amplitude of the pluck (0 - 127)

  • Strum all strings of the mandolin

    Declaration

    Swift

    @objc
    open func strum(_ position: Double, velocity: MIDIVelocity)

    Parameters

    position

    Position lengthwise along the string to pluck (0 - 1)

    velocity

    MIDI Velocity as an amplitude of the pluck (0 - 127)