ActivePatchKind
public enum ActivePatchKind : Equatable
extension ActivePatchKind: Codable
extension ActivePatchKind: CustomStringConvertible
Container for a user-selected soundfont patch or a user-created favorite.
-
Normal soundfont patch description
Declaration
Swift
case preset(soundFontAndPatch: SoundFontAndPatch)
-
Favorite soundfont patch
Declaration
Swift
case favorite(favorite: LegacyFavorite)
-
Exceptional case when there is no active patch
Declaration
Swift
case none
-
Get the associated SoundFontAndPatch value
Declaration
Swift
public var soundFontAndPatch: SoundFontAndPatch? { get }
-
Get the associated Favorite value
Declaration
Swift
public var favorite: LegacyFavorite? { get }
-
Attempt to obtain an active patch from data
Declaration
Swift
public static func decodeFromData(_ data: Data) -> ActivePatchKind?
Parameters
data
container to extract from
Return Value
optional ActivePatchKind
-
Attempt to encode an ActivePatchKind value to Data
Declaration
Swift
public func encodeToData() -> Data?
Return Value
optional Data containing the encoded value
-
Construct from an encoded state.
Declaration
Swift
public init(from decoder: Decoder) throws
Parameters
decode
state to read from
-
Save to an encoded state.
Declaration
Swift
public func encode(to encoder: Encoder) throws
Parameters
encoder
container to write to
-
Get a description string for the value
Declaration
Swift
public var description: String { get }