AKMetalBar

open class AKMetalBar: AKNode, AKComponent

Metal Bar Physical Model

  • Four letter unique description of the node

    Declaration

    Swift

    public static let ComponentDescription = AudioComponentDescription(generator: "mbar")
  • Ramp Time represents the speed at which parameters are allowed to change

    Declaration

    Swift

    @objc open dynamic var rampTime: Double = AKSettings.rampTime
  • Boundary condition at left end of bar. 1 = clamped, 2 = pivoting, 3 = free

    Declaration

    Swift

    @objc open dynamic var leftBoundaryCondition: Double = 1
  • Boundary condition at right end of bar. 1 = clamped, 2 = pivoting, 3 = free

    Declaration

    Swift

    @objc open dynamic var rightBoundaryCondition: Double = 1
  • 30db decay time (in seconds).

    Declaration

    Swift

    @objc open dynamic var decayDuration: Double = 3
  • Speed of scanning the output location.

    Declaration

    Swift

    @objc open dynamic var scanSpeed: Double = 0.25
  • Position along bar that strike occurs.

    Declaration

    Swift

    @objc open dynamic var position: Double = 0.2
  • Normalized strike velocity

    Declaration

    Swift

    @objc open dynamic var strikeVelocity: Double = 500
  • Spatial width of strike.

    Declaration

    Swift

    @objc open dynamic var strikeWidth: Double = 0.05
  • Tells whether the node is processing (ie. started, playing, or active)

    Declaration

    Swift

    @objc open dynamic var isStarted: Bool
  • Initialize this Bar node

    Declaration

    Swift

    public init(
            leftBoundaryCondition: Double = 1,
            rightBoundaryCondition: Double = 1,
            decayDuration: Double = 3,
            scanSpeed: Double = 0.25,
            position: Double = 0.2,
            strikeVelocity: Double = 500,
            strikeWidth: Double = 0.05,
            stiffness: Double = 3,
            highFrequencyDamping: Double = 0.001)

    Parameters

    leftBoundaryCondition

    Boundary condition at left end of bar. 1 = clamped, 2 = pivoting, 3 = free

    rightBoundaryCondition

    Boundary condition at right end of bar. 1 = clamped, 2 = pivoting, 3 = free

    decayDuration

    30db decay time (in seconds).

    scanSpeed

    Speed of scanning the output location.

    position

    Position along bar that strike occurs.

    strikeVelocity

    Normalized strike velocity

    strikeWidth

    Spatial width of strike.

    stiffness

    Dimensionless stiffness parameter

    highFrequencyDamping

    High-frequency loss parameter. Keep this small

  • Trigger the sound with an optional set of parameters

    Declaration

    Swift

    open func trigger()
  • Function to start, play, or activate the node, all do the same thing

    Declaration

    Swift

    @objc open func start()
  • Function to stop or bypass the node, both are equivalent

    Declaration

    Swift

    @objc open func stop()