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

@mimium/mimium-webaudio

v4.1.1

Published

webaudio audioworklet module to run mimium code on web browser.

Readme

mimium-webaudio

Webaudio audioworklet module to run mimium code on web browser.

https://mimium.org

The main entrypoint of compiler on web platform is mimium-web, which is directory exported from Rust code using wasm-pack.

The reason to split package for audioworklet module is because wasm-pack is not fully compatible with WebAudio AudioWorklet and need to write some wrapper code to load wasm modules.

Installation

npm install @mimium/mimium-webaudio

Basic usage

import {
	preloadMimiumLibCache,
	setupMimiumAudioWorklet,
} from "@mimium/mimium-webaudio";
import processorUrl from "@mimium/mimium-webaudio/dist/audioprocessor.mjs?url";

const ctx = new AudioContext();

const src = `
fn dsp(){
	0.0
}
`;

await preloadMimiumLibCache({
	libBaseUrl: "https://raw.githubusercontent.com/mimium-org/mimium-rs/dev/lib/",
});

const node = await setupMimiumAudioWorklet(ctx, src, processorUrl);
node.connect(ctx.destination);

setupMimiumAudioWorklet returns MimiumProcessorNode (AudioWorkletNode).

API

preloadMimiumLibCache(options?: {
	libBaseUrl?: string;
}): Promise<void>

setupMimiumAudioWorklet(
	ctx: AudioContext,
	src: string,
	MimiumProcessorUrl: string,
	options?: {
		libBaseUrl?: string;
		moduleBaseUrl?: string;
	}
): Promise<MimiumProcessorNode>

transpileMimiumToRust(
	src: string,
	options?: {
		libBaseUrl?: string;
		moduleBaseUrl?: string;
		samplerate?: number;
		buffersize?: number;
		direct?: boolean;
	}
): Promise<string>
  • libBaseUrl: Base URL for standard mimium libraries (default: https://raw.githubusercontent.com/mimium-org/mimium-rs/main/lib/).
  • moduleBaseUrl: Base URL for user modules resolved by mod / include (default: current page base URL).
  • samplerate: Sample rate used for transpile context (default: 44100).
  • buffersize: Buffer size used for transpile context (default: 128).
  • direct: Use synchronous transpile (emit_rust_direct) path (default: false).

For code that uses standard library modules (use osc::sinwave, etc.), calling preloadMimiumLibCache before setupMimiumAudioWorklet is recommended.

Notes

  • Compilation and library/module fetch are done on the main thread.
  • AudioWorklet uses preloaded virtual file cache and does not fetch files directly.

Testing (Playwright)

npx playwright install chromium
npx playwright test tests/compile.spec.ts

This test opens a browser page, creates AudioContext + AudioWorklet, compiles a mimium source, and verifies compile completion.