Home

Awesome

Mach1 Spatial Headtracking Examples

Demos

List of already deployed demos utilizing concepts of Mach1 Spatial and facetracking

Description

A consolidated web spatial audio player for Mach1 Spatial playback with two goals:

Setup

Usage

We have exposed some settings to extend usability of the facetracker mode.

Orientation Inputs

Facetracking

After exploring several web based facetrackers we have had the most success with MediaPipe FaceMesh. Landmark tracking with FaceMesh wasn't designed for us to calculate orientation rotations to be applied to something as sensitive as spatial audio playback, so we had to apply a filter to the motion results to "smooth" out any low frequency jitters. This can be seen via the 1Euro filter implementation:

window.createOneEuroFilters = function createOneEuroFilters() {
    fYaw = OneEuroFilter(60, 1.0, window.controls.oneEuroFilterBeta, 1.0);
    fPitch = OneEuroFilter(60, 1.0, window.controls.oneEuroFilterBeta, 1.0);
    fRoll = OneEuroFilter(60, 1.0, window.controls.oneEuroFilterBeta, 1.0);
};

Mobile Device IMU

Running this demo on a mobile device will now use the device's IMU sensor with gimbal rotations to ensure holding in portrait mode will have a smooth and expected full 3DOF rotations.

Mouse UI

When utilizing Touch mode a simple mouse control bound to width of window will be used as the input orientation for the Mach1Decode object(s) and for the OSC output.

Bose AR IMU

When utilizing Bose AR mode a connection prompt and handler supplied by the BoseAR Web SDK will be utilized for the input orientation for the Mach1Decode object(s) and for the OSC output.

License

Use of the Mach1Decode API in this example falls under the license supplied in this repo and derived from the Mach1 Spatial SDK viewable here