LegacyFavorite
public class LegacyFavorite : Codable
extension LegacyFavorite: Equatable
extension LegacyFavorite: CustomStringConvertible
A custom setting with a SoundFont patch and a keyboard configuration.
-
The type for the unique Key for a favorite
Declaration
Swift
public typealias Key = UUID -
Legacy encoding keys before consolidation into PresetConfig
See moreDeclaration
Swift
enum V1Keys : String, CodingKey -
Encoding keys with PresetConfig
See moreDeclaration
Swift
enum V2Keys : String, CodingKey -
The unique key of the favorite
Declaration
Swift
public let key: Key -
The key for the preset
Declaration
Swift
public let soundFontAndPatch: SoundFontAndPatch -
The custom configuration for the preset
Declaration
Swift
public var presetConfig: PresetConfig { get set } -
Create a new instance. The name of the favorite will start with the name of the patch.
Declaration
Swift
public init( soundFontAndPatch: SoundFontAndPatch, presetConfig: PresetConfig, keyboardLowestNote: Note? )Parameters
patchthe Patch to use
keyboardLowestNotethe starting note of the keyboard
-
Instantiate a Favorite using saved encoding.
Throws
throws exception if unable to decodeDeclaration
Swift
public required init(from decoder: Decoder) throwsParameters
decoderthe container to decode from
-
Custom encoder for the class because of the custom decoding.
Throws
throws exception if unable to encodeDeclaration
Swift
public func encode(to encoder: Encoder) throwsParameters
encoderthe container to encode into
-
Support equality operator
Declaration
Swift
public static func == (lhs: LegacyFavorite, rhs: LegacyFavorite) -> BoolParameters
lhsfirst argument to compare
rhssecond argument to compare
Return Value
true if same
-
Custom string representation for a favorite
Declaration
Swift
public var description: String { get }
View on GitHub
LegacyFavorite Class Reference