Preset Parameter Data Sources

A preset parameter data source is what the preset parameter in MimiProcessingSession uses to fetch the preset from Mimi’s backend. The SDK provides two types of preset data sources which have to provided during the activation of processing. To create a preset data source, you will need to provide a MimiPersonalization.Fitting value. The MimiPersonalization.Fitting model provides data about the current processing environment and in turn how presets should be generated.

Default Preset Parameter Data Source

The default preset parameter data source provides only one default personalization preset to the MimiProcessingSession.preset parameter.

do {
    let fitting = MimiPersonalization.Fitting.techLevel(3) // An example fitting, yours will be defined by your Processing system
    let presetDataSource = MimiDefaultPresetParameterDataSource(fitting: fitting)
    _ = try MimiCore.shared.processing.activate(presetDataSource: .default(presetDataSource))
} catch {
    // Handle activation failure
}

Up Down Preset Parameter Data Source

The up down preset parameter data source provides up to 3 presets (up, down & default) to the MimiProcessingSession.preset parameter. Activate processing with this data source to enable the Sound Personalization preset selection feature on the Profile.

Note: The up & down presets are available depending on the user’s hearing assessment. There might be cases where it is not possible to generate the up & down presets.

do {
    let fitting = MimiPersonalization.Fitting.techLevel(4) // An example fitting, yours will be defined by your Processing system
    let presetDataSource = MimiUpDownPresetParameterDataSource(fitting: fitting)
    _ = try MimiCore.shared.processing.activate(presetDataSource: .upDown(presetDataSource))
} catch {
    // Handle activation failure
}