PerformanceContext

public struct PerformanceContext

Context of a performing environment, in which there are any number of performers and instruments. A performer can play one or more instruments, and an instrument can be played by one or more performers.

  • The identifier for the given performer, if it exists in the PerformanceContext. Otherwise, nil.

    Declaration

    Swift

    public func identifier(for performer: Performer) -> Performer.ID?
  • The performer for the given identifier, if it exists in the PerformanceContext. Otherwise, nil.

    Declaration

    Swift

    public func performer(for identifier: Performer.ID) -> Performer?
  • The identifier for the given instrument, if it exists in the PerformanceContext. Otherwise, nil.

    Declaration

    Swift

    public func identifier(for instrument: Instrument) -> Instrument.ID?
  • The instrument for the given identifier, if it exists in the PerformanceContext. Otherwise, nil.

    Declaration

    Swift

    public func instrument(for identifier: Instrument.ID) -> Instrument?
  • The identifier for the given voice, if it exists in the PerformanceContext. Otherwise, nil.

    Declaration

    Swift

    public func identifier(for voice: Voice) -> Voice.ID?
  • The voice for the given identifier, if it exists in the PerformanceContext. Otherwise, nil.

    Declaration

    Swift

    public func voice(for identifier: Voice.ID) -> Voice?
  • A filter for constraining a view onto a PerformanceContext.

    Declaration

    Swift

    public struct Filter
  • Declaration

    Swift

    public func filtered(by filter: Filter) -> PerformanceContext

    Return Value

    A PerformanceContext filtered by the given PerformanceContext.Filter.