UserDefaults

extension UserDefaults
  • Obtain an NSNumber value from UserDefaults

    Declaration

    Swift

    public func number(forKey key: String) -> NSNumber?

    Parameters

    key

    the name of the setting to return

    Return Value

    optional NSNumber instance holding the value

  • Determine if UserDefaults contains a key under the given name

    Declaration

    Swift

    public func hasKey<T>(_ key: SettingKey<T>) -> Bool where T : SettingGettable, T : SettingSettable

    Parameters

    key

    the SettingKey to look for

    Return Value

    true if found

  • Remove the setting from UserDefaults

    Declaration

    Swift

    public func remove<T>(key: SettingKey<T>) where T : SettingGettable, T : SettingSettable

    Parameters

    key

    the SettingKey to remove

  • Enable subscripting by SettingKey instances.

    Declaration

    Swift

    public subscript<T>(key: SettingKey<T>) -> T where T : SettingGettable, T : SettingSettable { get set }

    Parameters

    key

    SettingKey instance to use as a key into UserDefaults

    Return Value

    instance of the template type from UserDefaults or the configured default value if it did not exist.

  • The number of days to wait after the first launch of the app before asking for a review

    Declaration

    Swift

    @objc
    public dynamic var daysAfterFirstLaunchBeforeRequest: Int { get set }
  • The number of months to wait between review requests

    Declaration

    Swift

    @objc
    public dynamic var monthsAfterLastReviewBeforeRequest: Int { get set }
  • The date of the first launch (not saved across reinstalls)

    Declaration

    Swift

    @objc
    public dynamic var firstLaunchDate: Date { get set }
  • The date of the last review request

    Declaration

    Swift

    @objc
    public dynamic var lastReviewRequestDate: Date { get set }
  • The version of the app for the last review request

    Declaration

    Swift

    @objc
    public dynamic var lastReviewRequestVersion: String { get set }
  • Current keyboard key labeling

    Declaration

    Swift

    @objc
    public dynamic var keyLabelOption: Int { get set }
  • Current keyboard key width

    Declaration

    Swift

    @objc
    public dynamic var keyWidth: Float { get set }
  • The lowest note on the keyboard that is currently visible

    Declaration

    Swift

    @objc
    public dynamic var lowestKeyNote: Int { get set }
  • When true, play a sound when changing the active preset

    Declaration

    Swift

    @objc
    public dynamic var playSample: Bool { get set }
  • When true, copy an SF2 file into the application’s folder when the file is added to the app.

    Declaration

    Swift

    @objc
    public dynamic var copyFilesWhenAdding: Bool { get set }
  • When true, show a solfege label when a note is played

    Declaration

    Swift

    @objc
    public dynamic var showSolfegeLabel: Bool { get set }
  • When true, allow finger movements on the keyboard to slide the keyboard to a new position

    Declaration

    Swift

    @objc
    public dynamic var slideKeyboard: Bool { get set }
  • The current MIDI channel to use for incoming MIDI events. OMNI mode is a value of -1 (default).

    Declaration

    Swift

    @objc
    public dynamic var midiChannel: Int { get set }
  • The MIDI virtual destination ID (not usser settable)

    Declaration

    Swift

    @objc
    public dynamic var midiVirtualDestinationId: Int32 { get set }
  • When true, the effects panel is visible. Used to restore UI state when relaunching the app.

    Declaration

    Swift

    @objc
    public dynamic var showEffects: Bool { get set }
  • The last active preset/patch

    Declaration

    Swift

    @objc
    public dynamic var lastActivePatch: Data { get set }
  • When true, the upper view is showing the favorites. Used to restore the app to the last view.

    Declaration

    Swift

    @objc
    public dynamic var showingFavorites: Bool { get set }
  • If true, the reverb AU is currently active

    Declaration

    Swift

    @objc
    public dynamic var reverbEnabled: Bool { get set }
  • If true, the reverb AU is globally active

    Declaration

    Swift

    @objc
    public dynamic var reverbGlobal: Bool { get set }
  • The current reverb preset being used

    Declaration

    Swift

    @objc
    public dynamic var reverbPreset: Int { get set }
  • The current reverb mix setting

    Declaration

    Swift

    @objc
    public dynamic var reverbWetDryMix: Float { get set }
  • If true, the delay AU is currently active

    Declaration

    Swift

    @objc
    public dynamic var delayEnabled: Bool { get set }
  • If true, the delay AU is globally active

    Declaration

    Swift

    @objc
    public dynamic var delayGlobal: Bool { get set }
  • The current delay amount in seconds

    Declaration

    Swift

    @objc
    public dynamic var delayTime: Float { get set }
  • The current feedback setting between -100% and 100%

    Declaration

    Swift

    @objc
    public dynamic var delayFeedback: Float { get set }
  • The current low-pass cutoff value for the delay effect

    Declaration

    Swift

    @objc
    public dynamic var delayCutoff: Float { get set }
  • The current delay mix setting

    Declaration

    Swift

    @objc
    public dynamic var delayWetDryMix: Float { get set }
  • The currently active font tag

    Declaration

    Swift

    @objc
    public dynamic var activeTagKey: LegacyTag.Key { get set }
  • The global tuning setting that is in effect

    Declaration

    Swift

    @objc
    public dynamic var globalTuning: Float { get set }
  • When true, global tuning is active

    Declaration

    Swift

    @objc
    public dynamic var globalTuningEnabled: Bool { get set }
  • When true, the user has viewed the tutorial pages

    Declaration

    Swift

    @objc
    public dynamic var showedTutorial: Bool { get set }
  • When true, the user has viewed the changes page

    Declaration

    Swift

    @objc
    public dynamic var showedChanges: String { get set }
  • The current scale factor that controls how much of the presets view to show in comparison to the fonts view

    Declaration

    Swift

    @objc
    public dynamic var presetsWidthMultiplier: Double { get set }
  • The number of semitones a max pitch bend will cause in a playing note

    Declaration

    Swift

    @objc
    public dynamic var pitchBendRange: Int { get set }
  • When true, the user has seen the prompt on how to restore hidden presets

    Declaration

    Swift

    @objc
    public dynamic var showedHidePresetPrompt: Bool { get set }