NoteSequence

public struct NoteSequence: ExpressibleByArrayLiteral

The NoteSequence abstraction represents an ordered collection of Note objects.

  • The underlying array of Note objects.

    Declaration

    Swift

    public var notes: [Element]
  • Variadic initializer from Note objects.

    Declaration

    Swift

    public init(arrayLiteral elements: Element...)
  • Initialize from a single duration and single velocity applied to multiple pitches.

    Declaration

    Swift

    public init(duration: Duration, velocity: UInt8, pitches: [Pitch])
  • Initialize from a single duration and single velocity applied to multiple pitches.

    Declaration

    Swift

    public init(durations: [Duration], velocities: [UInt8], pitches: [Pitch])
  • Export NoteSequence instance as a MusicSequence object. Needs testing.

    Declaration

    Swift

    public func toMusicSequence(on channel: UInt8) -> MusicSequence?