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
patch
the Patch to use
keyboardLowestNote
the 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) throws
Parameters
decoder
the 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) throws
Parameters
encoder
the container to encode into
-
Support equality operator
Declaration
Swift
public static func == (lhs: LegacyFavorite, rhs: LegacyFavorite) -> Bool
Parameters
lhs
first argument to compare
rhs
second argument to compare
Return Value
true if same
-
Custom string representation for a favorite
Declaration
Swift
public var description: String { get }