npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-multitrack-player

v1.0.0

Published

Low-latency multi-track audio player for React Native using Superpowered SDK

Readme

react-native-multitrack-player

Reprodução de múltiplas faixas de áudio com baixa latência para React Native, baseada no Superpowered Audio SDK.

Biblioteca recriada a partir do TCC "Áudio De Baixa Latência Em Dispositivos Móveis" — Maykon Michel Palma, UNESP Bauru, 2022.

Requisitos

  • React Native 0.74+ (Nova Arquitetura / TurboModules)
  • Android: NDK, minSdkVersion 21
  • iOS: 13.0+
  • Licença Superpowered: registre-se em superpowered.com/dev para obter sua chave gratuita

Instalação

npm install react-native-multitrack-player
# ou
yarn add react-native-multitrack-player

iOS (CocoaPods)

cd ios && pod install

Android

O build system configura automaticamente o NDK via CMake. Certifique-se de que o NDK está instalado no Android Studio.

Uso

import { useMultiTrackPlayer } from 'react-native-multitrack-player';
import RNFS from 'react-native-fs'; // para obter o caminho temporário

export function MixerScreen() {
  const {
    isPlaying,
    setTracks,
    togglePlayback,
    setTrackVolume,
    muteTrack,
    panTrackLeft,
    panTrackRight,
    panTrackCenter,
    setRate,
    setPitchShiftCents,
  } = useMultiTrackPlayer({
    licenseKey: 'SUA_CHAVE_SUPERPOWERED',
    tempFolderPath: RNFS.TemporaryDirectoryPath,
  });

  useEffect(() => {
    setTracks([
      '/path/to/vocal.mp3',
      '/path/to/guitar.mp3',
      '/path/to/drums.mp3',
      '/path/to/keys.mp3',
      '/path/to/bass.mp3',
    ]);
  }, []);

  return (
    <>
      <Button title={isPlaying ? 'Pause' : 'Play'} onPress={togglePlayback} />

      {/* Panning da guitarra */}
      <Button title="Guitar L" onPress={() => panTrackLeft(1)} />
      <Button title="Guitar C" onPress={() => panTrackCenter(1)} />
      <Button title="Guitar R" onPress={() => panTrackRight(1)} />

      {/* Mute da bateria */}
      <Button title="Mute Drums" onPress={() => muteTrack(2)} />

      {/* Volume individual */}
      <Slider onValueChange={(v) => setTrackVolume(0, { left: v, right: v })} />

      {/* Pitch shift: +200 cents = 2 semitons acima */}
      <Button title="+2 semitones" onPress={() => setPitchShiftCents(200)} />
    </>
  );
}

API

useMultiTrackPlayer(options)

Opções

| Prop | Tipo | Descrição | |------|------|-----------| | licenseKey | string | Chave do Superpowered SDK | | tempFolderPath | string | Caminho para arquivos temporários |

Retorno

| Método | Assinatura | Descrição | |--------|-----------|-----------| | setTracks | (paths: string[]) => void | Carrega as faixas | | play | () => void | Inicia reprodução sincronizada | | pause | () => void | Pausa todas as faixas | | togglePlayback | () => void | Alterna play/pause | | setPosition | (ms: number) => void | Seek em milissegundos | | getPositionMs | () => Promise<number> | Posição atual | | setTrackVolume | (index, { left, right }) => void | Volume L/R por faixa | | muteTrack | (index) => void | Silencia uma faixa | | panTrackLeft | (index) => void | Panning esquerdo | | panTrackRight | (index) => void | Panning direito | | panTrackCenter | (index) => void | Panning central (estéreo) | | setVolume | (value) => void | Volume global (0–1) | | setRate | (rate) => void | Velocidade (1.0 = normal) | | setPitchShiftCents | (cents) => void | Pitch shift (−2400 a 2400) | | getBufferedPercent | () => Promise<number> | % total carregado | | getTrackBufferedPercent | (index) => Promise<number> | % de uma faixa | | getDurationMs | (path) => Promise<number> | Duração de um arquivo |

Arquitetura

TypeScript (useMultiTrackPlayer hook)
    ↓ TurboModule (Codegen)
Android: Kotlin → JNI → C++ | iOS: Objective-C++ → C++
    ↓
Track.cpp + MultiTracksPlayer.cpp
    ↓
Superpowered Audio SDK v2.8.0
    ↓
Android: OpenSL ES  |  iOS: CoreAudio

Licença

MIT — veja LICENSE.

O Superpowered Audio SDK tem licença própria. Consulte superpowered.com.