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

focusmusic

v1.3.0

Published

Infinite generative focus music for deep work - Brain.fm style ambient electronic music in your terminal

Downloads

557

Readme

focusmusic

Infinite generative focus music for deep work. Brain.fm-style ambient electronic music that runs directly in your terminal.

Features

  • Infinite generative music - Never repeats, always evolving
  • Multiple sound layers - Warm pads, melodic arpeggios, deep beats, ambient textures
  • 8 drum kits - Deep House, Techno, Ambient, EDM, Minimal, Dark, Lo-Fi, Dub
  • 8 synth presets - Warm Pad, Soft Pluck, Glassy, Analog Lead, Sub Pulse, Shimmer, Muted Keys, Hollow
  • Perlin noise modulation - Smooth, organic parameter changes
  • Auto-advancement - Tracks automatically transition every 8-15 minutes
  • Terminal UI - Clean, minimal interface with ANSI colors

Installation

Run directly with bunx (recommended)

bunx focusmusic

Install globally

bun install -g focusmusic
focusmusic

Clone and run locally

git clone https://github.com/petrbrzek/focusmusic.git
cd focusmusic
bun install
bun run start

Usage

# Start with default settings
focusmusic

# Set custom BPM (70-120)
focusmusic --bpm 95

# Set custom volume (0-100)
focusmusic --volume 50

# Use higher-latency playback and debug warnings if you hear crackles
focusmusic --latency playback --diagnostics

# Show help
focusmusic --help

Controls

| Key | Action | |-----|--------| | n / Space | Next track | | q / Escape | Quit |

Requirements

  • Bun runtime (v1.0+)
  • macOS, Linux, or Windows
  • Audio output device

Linux Notes

On Linux, you may need JACK or PipeWire-JACK for audio output. If you experience audio issues, try:

# Install JACK
sudo apt install jackd2

# Or use PipeWire with JACK compatibility
sudo apt install pipewire-jack

How It Works

focusmusic generates music in real-time using Web Audio API synthesis:

  1. Clock System - Central timing source keeps all layers synchronized
  2. Pad Layer - Warm, sustained chords with slow filter sweeps
  3. Arp Layer - Melodic patterns using various synth presets
  4. Beat Layer - Kick drums with sidechain compression
  5. Texture Layer - Filtered brown noise for atmosphere
  6. Perlin Modulation - All parameters smoothly evolve using simplex noise

Each track randomly selects:

  • Musical scale (Minor Pentatonic, Dorian, Phrygian, Aeolian)
  • Root note (D2-A2 range for deep bass)
  • BPM (randomized within 70-120 range)
  • Drum kit style
  • Synth preset (15% chance of no arp for minimal tracks)

Tech Stack

License

MIT

Author

Petr Brzek