Processing API Architecture
The Processing APIs can be divided into four main components:
- MimiProcessingController - Root entry point and context for Processing API access.
- MimiProcessingSession - The provider of access to processing parameters when activated.
- MimiProcessingParameter - Individual parameter object that provides state, data and mutation.
- MimiProcessingParameterApplicator - Responsible for applying the processing parameter values to external systems.
Root entry point and context for Processing API access.
MimiProcessingController is a controller owned and intialized by
MimiCore. It owns activation/deactivation of processing sessions, and therefore can be used as the source of truth for the active processing session.
- Centralized location for access to Processing APIs.
- Owner of active processing session including activation and deactivation.
The provider of access to processing parameters when activated.
As described in the previous section, a
MimiProcessingSession is owned by a
MimiProcessingController, which is responsible for handling the session lifecycle in terms of activation/deactivation.
MimiProcessingSession itself owns the processing parameters, and therefore is the gateway to parameter access.
- Owner of all processing parameters, providing access to
- Source of truth for
fittingwhich provides required fitting information for preset acquisition.
- Provides the ability for processing to be “interrupted” and automatically disabled due to external events (such as the hearing test launching).
The focal point for state, application and data.
MimiProcessingParameter represents an individual parameter that can be used to control Mimi processing functionality. It encompasses a value that can be mutated and applied asynchronously with the help of
MimiProcessingSession defines the following processing parameters to provide access and control of the Mimi processing:
isEnabled- Whether Mimi processing is enabled or disabled.
intensity- Intensity of Mimi processing.
preset- Preset data model for use with a Mimi processor.
- Providing access to the current parameter value.
- Applying values to a collection of associated applicators using the value application sequence.
- Fetching values from remote data sources asynchronously (such as preset data).
- Providing state and value updates to a collection of registered subscribers.
- Ability to set a
discretedelivery mode for the value application sequence.
Responsible for applying the processing parameter values to external systems.
Arguably the most relevant Processing API component for most integrators is the
An applicator is an accessory of a
MimiProcessingParameter that is capable of performing the value application logic for its associated parameter. It is roughly equivalent to the previous
In simple terms, its role is to apply processing parameter values to an external system. When there is a request to update a processing parameter value, its applicators are requested to apply this value. The result of this request in turn influences the
- Provides a
canApplymethod which can synchronously verify whether a requested value can be set on the applicator.
- Provides an
applymethod which will allow the applicator to asynchronously apply a value to an external system.
- Ability to set a
timeoutto specify a time duration which if exceeded is considered erroneous and will cause a value application sequence to fail.
The Integrating Processing guide explains how to add a custom Processing component to provide your users with Mimified audio.