Builder
public final class Builder
A class which encapsulates the stateful construction of a PerformanceContext.
-
Creates an empty
PerformanceContext.Builder.Declaration
Swift
public init()
-
Adds the given
Performerto thePerformanceContext.Declaration
Return Value
The identifier for the given
performer. -
Adds the given
instrumentto thePerformanceContext.Declaration
Swift
@discardableResult public func addInstrument(_ instrument: Instrument) -> Instrument.IDReturn Value
The identifier for the given
instrument. -
Adds a new voice for the given
performerandinstrument, with a givennumber, if the voices already exists. Otherwise, a new voice will be generated for the performer-instrument pair.Declaration
Swift
@discardableResult public func addVoice(_ voice: Voice? = nil, performer: Performer, instrument: Instrument) -> Voice.ID -
Declaration
Swift
public func build() -> PerformanceContextReturn Value
A completed
PerformanceContext.
View on GitHub
Install in Dash
Builder Class Reference