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

@nice2dev/ui-audio

v1.0.3

Published

Nice2Dev Audio UI — DAW editor, karaoke engine, player, playlist, DMX, music visualizers for React

Readme

@nice2dev/ui-audio

Audio UI component library for React applications. Provides a complete set of DAW editor components, karaoke engine, audio player, playlist management, music visualizers, MIDI support, effects, and audio processing utilities.

npm License: MIT TypeScript


Installation

npm install @nice2dev/ui-audio

Peer Dependencies

Required:

  • react >= 17
  • react-dom >= 17

Optional (enable specific features):

  • react-youtube — YouTube player integration
  • react-window — virtualized playlist rendering
  • hls.js — HLS streaming support
  • pitchy — real-time pitch detection
  • phaser — Phaser-based karaoke renderer
  • framer-motion — animated transitions
  • @fortawesome/react-fontawesome + icon packages — icons
  • music-metadata-browser — audio file metadata parsing
  • fflate — compression utilities
  • @ffmpeg/ffmpeg — audio format conversion
  • @monaco-editor/react — code editor integration
  • react-bootstrap — Bootstrap UI components
  • wav-decoder — WAV file decoding

Usage

i18n Setup

Wrap your app with NiceI18nProvider to supply translations:

import { NiceI18nProvider } from '@nice2dev/ui-audio';

function App() {
  return (
    <NiceI18nProvider t={(key, fallback) => fallback ?? key}>
      <YourAudioApp />
    </NiceI18nProvider>
  );
}

Audio Player

import { GenericPlayer, GenericPlayerControls } from '@nice2dev/ui-audio';

<GenericPlayer src="/track.mp3" title="My Song" artist="Artist" />

Karaoke

import { KaraokeLyrics, KaraokeTimeline } from '@nice2dev/ui-audio';

<KaraokeLyrics notes={karaokeNotes} currentTime={time} />
<KaraokeTimeline notes={karaokeNotes} currentTime={time} duration={180} />

DAW Editor

import {
  Waveform, PianoRoll, AudioTimeline,
  EditorTrackProvider, useEditorTrack,
} from '@nice2dev/ui-audio';

<EditorTrackProvider value={editorState}>
  <Waveform data={waveformData} zoom={zoom} />
  <PianoRoll notes={midiNotes} duration={duration} zoom={zoom} />
</EditorTrackProvider>

Playlist

import { GenericPlaylist, PlaylistBrowser } from '@nice2dev/ui-audio';

<GenericPlaylist items={tracks} onSelect={handleSelect} />
<PlaylistBrowser
  renderLibrarySearch={(props) => <MySearch {...props} />}
  renderLibraryList={(props) => <MyList {...props} />}
/>

Visualizer

import { StageVisualizer } from '@nice2dev/ui-audio';

<StageVisualizer analyser={analyserNode} mode="spectrum" />

API Architecture

This library is backend-agnostic. All API-dependent operations are exposed as callback props or dependency injection instead of hardcoded API calls:

  • Player: searchYouTubeByArtistTitle callback prop on YouTubePlayer
  • Pitch Analysis: postPitch / postLibrosaPitchTrack callbacks on AudioPitchAnalyzer
  • Playlist: Render props (renderLibrarySearch, renderLibraryList) on PlaylistBrowser
  • Editor CRUD: ProjectCRUDDeps interface for useProjectCRUD hook
  • Settings: Optional fetchSettings callbacks for karaoke settings hydration
  • Audio Sources: registerAudioSourceComponent() for pluggable audio source types

Exports

Components

| Module | Components | |--------|-----------| | Editor | Waveform, PianoRoll, CCLane, AudioTimeline | | Editor Panels | AutoSavePanel, UndoRedoPanel, ZoomSnapControls, MasterFXPanel, RecordingOptionsPanel, CCAutomationLaneEditor, ArpeggiatorPanel, LFOPanel, StepSequencerPanel | | Karaoke | KaraokeLyrics, KaraokeTimeline, BarFillEditor, AudioPitchAnalyzer | | Karaoke Editor | KaraokeEditorManager, KaraokePhaserRenderer | | Player | GenericPlayer, GenericPlayerControls, GenericPlayerStage, GenericPlayerStageVisualizer, YouTubePlayer | | Visualizer | StageVisualizer, ModeSwitcher | | Playlist | GenericPlaylist, GenericPlaylistItem, PlaylistTagEditor, DynamicRuleEditor, PlaylistDualPane, PlaylistBrowser, PlaylistList, PlaylistSidebar | | Effects | NoteRiver, NoteParticles |

Hooks

| Hook | Purpose | |------|---------| | useEditorTrack | Shared DAW editor state via context | | useProjectCRUD | Project/section/layer CRUD with dependency injection | | useCCAutomation | CC automation lane management | | useStepSequencer | Step sequencer state | | useWebMidi | Web MIDI API access | | useMidiLearn | MIDI learn/mapping | | useOxygen25 | M-Audio Oxygen 25 controller profile | | usePitchWorker | Pitch detection Web Worker | | useScoringWorker | Karaoke scoring Web Worker | | useLocalPlaylists | Local playlist storage |

Engine

| Export | Purpose | |--------|---------| | AudioPlaybackEngine | Multi-track audio playback | | VocalEffectsEngine | Real-time vocal effects (reverb, delay, distortion, etc.) | | SimpleSynth | Basic synthesizer | | getAudioContext | Shared AudioContext management |

Utilities

Karaoke scoring, pitch analysis, audio editor operations, timeline calculations, LFO engine, arpeggiator, step sequencer, CC automation, groove templates, vocal performance metrics, undo/redo, latency estimation.

Models

Type definitions for karaoke notes, audio projects, DMX channels, playlists, editor state, MIDI events, and timeline operations.

Build

npm run build       # Vite library build
npm run typecheck   # TypeScript type checking
npm run test        # Vitest unit tests

License

MIT © NiceToDev