New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

notater

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notater

Core music logic for Notater ecosystem

latest
npmnpm
Version
0.1.21
Version published
Maintainers
1
Created
Source

@notater/core

Headless music engine for the Notater ecosystem.

Installation

pnpm add notater

Features

  • 🎵 Pattern & Track System - Flexible data structures for beats
  • ⏱️ Audio Engine - High-precision Tone.js scheduler
  • 🎹 MIDI Export - Export patterns to standard MIDI files
  • 📦 Zero UI Dependencies - Use anywhere (CLI, web, Node.js)

Usage

Audio Playback

import { AudioEngine, type Pattern } from "notater";

const engine = new AudioEngine();

// Set tempo
engine.setBpm(120);

// Set pattern
engine.setPattern(myPattern);

// Register callback for step triggers
engine.setCallback((event) => {
  console.log(`Track ${event.trackId} step triggered at ${event.time}`);
});

// Start playback (requires user gesture on web)
await engine.start();

// Stop
engine.stop();

MIDI Export

import { patternToMidi, type Pattern } from "notater";
import fs from "fs";

const pattern: Pattern = {
  id: "my-pattern",
  name: "Demo Beat",
  bars: 1,
  tracks: [
    /* ... */
  ],
};

const midiData = patternToMidi(pattern);
fs.writeFileSync("output.mid", midiData);

Types

interface Pattern {
  id: string;
  name: string;
  tracks: Track[];
  bars: number;
}

interface Track {
  id: string;
  instrument: Instrument;
  steps: Record<number, Step>;
  length: number;
}

interface Step {
  id: string;
  index: number;
  type: "on" | "off" | "hold";
  velocity: number;
  duration: number;
  microTiming: number;
  pitch?: string;
}

License

MIT

FAQs

Package last updated on 03 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts