Open-source React Native library

React Native Audio Mixer: multitrack audio playback for iOS and Android

Load several stems of the same song and play them in sync, with volume, pan, mute, solo and level meters for every track. The mixing runs in native code on each platform, while your app controls it from a small typed JavaScript API.

React Native Audio MixerSeparate stems. One song.
  1. 01
    Load the stemsPass the M4A URLs to AudioMixer.load(). The library downloads and decodes every track before playback.
  2. 02
    Mix each trackChange the volume and pan of any track while it plays. Mute and solo are built on volume.
  3. 03
    Play them in syncAll tracks are mixed into one native audio stream, so seeking and pausing move them together.

The same API and events on iOS and Android.

Interactive demo

Mix a song right here

This demo recreates the library's example app in your browser. Play the song, solo the bass, pan the chords to one side, and watch the matching AudioMixer calls appear beside the mixer.

Demo song · 4 stemsSynthesized in C major, 100 BPM

Load four synthesized stems (about 600 KB) and mix them in your browser.

Equivalent library callsEvents start with ←
  1. , then use the controls to see the matching AudioMixer calls and events.

The browser version uses the Web Audio API to show how the mixer behaves. In an app, the library does the same work natively: AudioToolbox and miniaudio on iOS, ffmpeg-kit and Oboe on Android. The four stems are synthesized, so they carry no copyright.

In a real app

The same mixer on an iPhone

This is the library's example app running on iOS, recorded in the simulator. Each control sends one call to the native mixer, and the stems keep playing while you change them.

  1. 01
    Load and playFour five-minute stems download, decode and start together.
  2. 02
    Solo, mute and panThe bass plays alone, the chords move left and the melody drops out, all mid-song.
  3. 03
    SeekJumping to another point moves every stem at once.
The example app in the iOS simulator, with the call behind each step

Built for real-time playback

Fast controls, live updates and a small memory footprint

Next buffer

Low-latency controls

Volume, pan, mute and solo are picked up by the audio thread on its next buffer, so a change is heard right away without restarting playback. On iOS the audio callback never allocates, locks or reads a file. On Android, Oboe runs in its low-latency, exclusive mode.

100 ms

Real-time progress updates

PlaybackProgress and TracksAmplitudes events arrive about ten times a second while a song plays, enough for a smooth progress bar and a level meter on every track.

~5 MB

Low memory, even for long songs

Loading four five-minute stems added about 5 MB to the example app on iOS. The engine decodes a two-second window per track ahead of the playhead instead of the whole song, which would take nearly 500 MB. Android reads the converted audio from disk in small chunks.

Measured with a Release build of the example app in the iOS 26 simulator on an iPhone 17 Pro. The whole app, React Native included, stayed under 80 MB through a full five-minute song.

Add it to your app

Get started in your React Native app

Install the package and the iOS pods, then load your stems and control them from JavaScript. Listen for DownloadComplete to get the track id for each URL; every other method takes that id.

The library contains native code, so in an Expo app it needs a development build rather than Expo Go. Android needs API 24 or newer.

yarn add @widefix/react-native-audio-mixer
cd ios && pod install
import AudioMixer from '@widefix/react-native-audio-mixer';

AudioMixer.addListener('DownloadComplete', setTracks);
AudioMixer.load([vocalsUrl, drumsUrl, bassUrl]);

AudioMixer.togglePlay();
AudioMixer.setVolume(tracks[vocalsUrl], 0.5);
AudioMixer.setPan(tracks[drumsUrl], -1);
AudioMixer.seek(0.25);

Why multitrack audio is hard on mobile

Playing one file is easy, keeping several in step is not

Rehearsal, practice and music-learning apps often need every instrument as its own track. Starting a separate player for each stem drifts out of time, and each platform handles decoding, mixing and interruptions differently.

01

Stay in time

Tracks that start, pause or seek independently slowly fall apart. A listener hears the drift immediately.

02

React in real time

Moving a fader or muting a part has to change what plays right away, without restarting the song.

03

Behave like a good app

Phone calls, other apps and the background all interrupt audio, and iOS and Android report them differently.

Built for multitrack playback

What the library handles for you

Stems that stay in sync

Every track is mixed into one native audio stream, so play, pause and seek move all stems together instead of coordinating separate players.

Volume and pan per track

Set each track's volume from 0 to 1 and pan from left to right while the song plays. Mute and solo follow from volume, as the example app shows.

Progress and level meters

Events report the playback position and the level of every track about every 100 ms while playing, ready to drive a progress bar and meters.

Interruptions handled

Playback pauses for phone calls, other apps taking audio focus and the app going to the background, and tells JavaScript when it stopped on its own.

One typed API for both platforms

The same methods and event payloads on iOS and Android, with TypeScript types for every event, so app code does not branch by platform.

Proven in a production app

Extracted from a mobile app we built and maintain

The mixer started as the audio engine of the Worship Online mobile app, where worship teams rehearse with individual instrument tracks. We extracted it into its own package, aligned the iOS and Android behavior and added a typed API, so other React Native teams can use it.

Read how we built the Worship Online app

Built and maintained by WideFix

Need a hand with your mobile or Rails product?

We build and take ownership of web and mobile applications, from production issues and upgrades to ongoing development. The same practical experience shapes the tools we open-source.

Back to TopBack to Top