Processing Concepts¶
The Processing APIs can be divided into these components:
- Processing Controller - The root entry point and context for Processing API access.
- Processing Session - The provider of access to processing Processing Parameters when activated.
- Processing Features - A grouping of conceptually related Processing Modules.
- Processing Modules - A grouping of Processing Parameters to control the user experience.
- Processing Parameters - Individual parameter objects that provides state, data and mutation.
- Processing Applicators - Responsible for applying the Processing Parameter values to external systems.
- Processor - the external system which performs Mimi Processing.
ProcessingController¶
Overview¶
The ProcessingController is a controller owned and initialized by MimiCore.
It is responsible for the activation and deactivation of the Processing Session, and owns the active ProcessingSession instance.
Responsibilities¶
- Centralized location for accessing Processing APIs.
- Owner of active Processing Session.
- Provides activation and deactivation of Processing Session.
Activation¶
As the ProcessingController owns the ProcessingSession instance; it is where Processing can be "activated" or "deactivated".
Once there is an activated ProcessingSession, it is possible to access the MimiProcessingParameters, change their values which affect the characteristics of the audio.
Lifecycle¶
The ProcessingController is responsible for handling the ProcessingSession lifecycle in terms of activation and deactivation.
- Activating a session will set the
activeSessionproperty on theProcessingControllerallowing the session to be referenced. - Only a single session can be activated at a time.
- Deactivation clears the
activeSessionproperty. It does not directly affect the applied Mimi Processing. - Activating and deactivating a session triggers
MimiObservernotifications to observers.
ProcessingSession¶
Provides access to the Processing Features and their individual Modules.
Overview¶
As described in the previous section, a ProcessingSession is owned by the ProcessingController.
The ProcessingSession itself owns the various Features and Modules which are made available depending on the Processor's capabilities and configuration.
Through those components you can access the Processing Parameters.
Responsibilities¶
- Through the Modules, the Owner of all Processing Parameters.
- Provides the ability for processing to be "suspended" and automatically disabled due to external events (such as the hearing test launching).
Upon activation, the ProcessingSession will be initialized and the previously applied Parameter values are restored to their respective parameters. At this point the Parameters are ready for use.
Processing Features and Modules¶
Provides access to the groups Processing Parameters.
Overview¶
The ProcessingSession itself owns the MimiProcessingParameters, and therefore is the gateway to parameter access.
Responsibilities¶
- Owner of all Processing Parameters.
- Exposes the current data source configuration for the
presetparameter. - Provides the ability for processing to be "interrupted" and automatically disabled due to external events (such as the hearing test launching).
Upon activation, the ProcessingSession will be initialized and the previously applied parameter values are restored to their respective parameters. At this point the parameters are ready for use.
Processing Parameter¶
Tne individually modifiable value of a Module which affects the user's audio experience.
Overview¶
A 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 to subscribed components called Applicators.
Responsibilities¶
In general terms, a MimiProcessingParameter is responsible for:
- Providing access to the current parameter value.
- Applying values to an
Applicatorusing the value application sequence. - Loading values from remote data sources asynchronously (such as preset data).
- Providing state and value updates to a collection of subscribed observers.
MSDK ProcessingParameter instances¶
The ProcessingSession defines various MimiProcessingParameter instances within the available Modules to provide access and control of the Mimi processing:
For example:
* soundPersonalization.media.isEnabled - Whether Mimi Media Sound Personalization is enabled or disabled.
* voiceClarity.denoiser.intensity - Intensity of the Denoiser.
* soundPersonalization.media.preset - Preset data model for use by a Mimi Processor for Media Sound Personalization.
Parameter value application sequence summary¶
The internal process of updating a MimiProcessingParameter value or transferring the existing value to the Applicator follows a specific sequence as executed by the MimiProcessingParameter:
- The
Applicatoris requested to apply the new value.- If any
Applicatorfails to apply the value (by returningMimiApplicatorResult.Failure), the application sequence fails and observers are notified of the failure. - If successful (the
ApplicatorreturnsMimiApplicatorResult.Success), the value is updated and observers are notified of the new value.
- If any
- A return result value is given for the request.
Applicator¶
Arguably the most relevant Processing API component for integrators is the Applicator.
An Applicator is an accessory of a MimiProcessingParameter that is capable of performing the value application logic for its associated MimiProcessingParameter.
In simple terms, its role is to apply MimiProcessingParameter values to an external system. When there is a request to update a MimiProcessingParameter value, its Applicator is requested to apply this value.
For example, it will send Bluetooth commands to your device to set the isEnabled state.
Note
For Automatic Processing Configuration, there is a single externally exposed Applicator for the overall system which internally is wired into the available individual MimiProcessingParameters.
While an Applicator appears quite similar to an Observer, the two components have distinct roles:
- An Applicator is responsible for the value application logic of a
MimiProcessingParameter- the result of which influences theMimiProcessingParameterstate. - An
Observeris only informed of events reflecting committed changes to theMimiProcessingParameterstate; it cannot influence theMimiProcessingParameterstate.
Responsibilities¶
- Provides an
onApplyfunction which will allow theApplicatorto asynchronously apply a value your processing system, returning the appropriateMimiApplicatorResultinstance. - Ability to set a “Delivery Timeout” to specify a time duration which if exceeded is considered erroneous and will cause a value application sequence to fail.