AKMandolin

open class AKMandolin: AKNode, AKComponent

Physical model of a 4 course mandolin

  • Ramp Time represents the speed at which parameters are allowed to change

    Declaration

    Swift

    open var rampTime: Double = AKSettings.rampTime
  • Detuning of second string in the course (1=Unison (deault), 2=Octave)

    Declaration

    Swift

    open var detune: Double = 1
  • Relative size of the mandoline (Default: 1, ranges ~ 0.5 - 2)

    Declaration

    Swift

    open var bodySize: Double = 1
  • Initialize the 4 course (string-pair) Mandolin

    • 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)

    Declaration

    Swift

    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

    • 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

    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

    • Parameters:
      • noteNumber: MIDI note number of fretted note
      • course: Which set of strings to press

    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

    • 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)

    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

    • Parameters:
      • position: Position lengthwise along the string to pluck (0 - 1)
      • velocity: MIDI Velocity as an amplitude of the pluck (0 - 127)

    Declaration

    Swift

    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)