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 🙏

© 2025 – Pkg Stats / Ryan Hefner

takomusic

v2.1.2

Published

TakoScore - A phrase-first DSL for vocal synthesis composition optimized for NEUTRINO

Readme

TakoMusic

A domain-specific language (DSL) for music composition that generates VSQX, MusicXML, and MIDI files.

Features

  • MFS Language: Write music using a simple, readable syntax
  • Multi-format Export: Generate VSQX (Vocaloid), MusicXML (notation), and MIDI (instruments)
  • Advanced MIDI: CC, pitch bend, aftertouch, NRPN, SysEx, MPE support
  • Extended Notation: Tuplets, grace notes, articulations, dynamics, ornaments
  • Vocaloid Support: Full parameter control, vibrato, growl, cross-synthesis
  • Algorithmic Composition: Euclidean rhythms, Markov chains, pattern generation
  • Module System: Organize code with imports/exports
  • CLI Tools: Build, check, format, play, import, record, and render

Installation

npm install
npm run build

Quick Start

1. Create a new project

mf init myproject           # Default template
mf init myproject -t piano  # Piano template
mf init --list              # List all templates

2. Edit src/main.mf

export proc main() {
  title("My First Song");
  ppq(480);
  timeSig(4, 4);
  tempo(120);

  track(midi, piano, { ch: 1, program: 0 }) {
    at(1:1);
    chord([C4, E4, G4], 1n);
  }

  track(midi, drums, { ch: 10, vel: 100 }) {
    at(1:1);
    drum(kick, 4n); drum(hhc, 4n);
    drum(snare, 4n); drum(hhc, 4n);
  }
}

3. Build and play

mf check              # Check for errors
mf build              # Generate MIDI, MusicXML, VSQX
mf play               # Live preview with FluidSynth
mf render -p cli      # Render audio

CLI Commands

| Command | Description | |---------|-------------| | mf init [dir] | Initialize new project | | mf build | Compile to IR and output formats | | mf check | Static analysis | | mf fmt | Format source files | | mf play [file] | Live preview with FluidSynth | | mf import <file> | Import MusicXML to MFS | | mf record | Record MIDI input | | mf render -p <profile> | Render audio | | mf doctor | Check dependencies |

Available Templates: default, piano, orchestral, edm, chiptune, jazz, vocaloid, minimal

Documentation

Language Basics

Pitch & Duration Literals

Pitches:

  • Natural: C4, D4, E4, F4, G4, A4, B4
  • Sharp: C#4, D#4, F#4, G#4, A#4
  • Flat: Db4, Eb4, Gb4, Ab4, Bb4

Durations:

  • 1n = whole, 2n = half, 4n = quarter
  • 8n = eighth, 16n = sixteenth, 32n = thirty-second
  • 4n. = dotted quarter, 8n. = dotted eighth
  • 480t = 480 ticks

Time:

  • 1:1 = bar 1, beat 1
  • 2:3 = bar 2, beat 3
  • 1:1:240 = bar 1, beat 1, tick 240

Drum Names: kick, snare, hhc, hho, tom1, crash, ride

Control Structures

// Procedures
proc myPattern() {
  note(C4, 4n);
}

// Loops
for (i in 1..=4) {
  myPattern();
}

// Conditionals
if (x > 0) {
  note(C4, 4n);
} else {
  rest(4n);
}

Modules

// phrases/drums.mf
export proc BEAT_8() {
  drum(kick, 8n);
  drum(hhc, 8n);
}

// main.mf
import { BEAT_8 } from "./phrases/drums.mf";

export proc main() {
  track(midi, drums, { ch: 10 }) {
    for (bar in 1..=4) {
      BEAT_8();
    }
  }
}

Standard Library Import

import { major, minor } from "std:theory";
import { euclidean } from "std:patterns";
import { crescendo } from "std:dynamics";

Configuration (mfconfig.toml)

[project]
name = "my-song"
version = "1.0.0"
entry = "src/main.mf"
dist = "dist"
out = "out"

[profiles.cli]
backend = "headless"
musicxml_out = "dist/vocal.musicxml"
band_mid_out = "dist/band.mid"
render_out = "out/mix.mp3"
vocal_cmd = ["neutrino", "{musicxml}", "{vocal_wav}"]
midi_cmd = ["fluidsynth", "-ni", "soundfont.sf2", "{mid}", "-F", "{band_wav}"]
mix_cmd = ["ffmpeg", "-i", "{vocal_wav}", "-i", "{band_wav}", "-y", "{mix_wav}"]

External Tools

FluidSynth (Live Preview & MIDI Rendering)

# Windows
winget install FluidSynth.FluidSynth

# macOS
brew install fluid-synth

# Linux
apt install fluidsynth

NEUTRINO (Vocal Synthesis)

  1. Download from official site
  2. Set NEUTRINO_DIR environment variable
  3. Configure vocal_cmd in mfconfig.toml

FFmpeg (Audio Mixing)

# Windows
winget install FFmpeg

# macOS
brew install ffmpeg

# Linux
apt install ffmpeg

Error Codes

| Code | Description | |------|-------------| | E050 | Global function called after track started | | E110 | Pitch out of range (0-127) | | E200 | Vocal note overlap | | E210 | Invalid/empty lyric in vocal track | | E220 | drum() used in vocal track | | E221 | chord() used in vocal track | | E300 | Top-level execution in imported module | | E310 | Recursion detected | | E400 | Import not found / undefined symbol / no main() | | E401 | For range bounds must be compile-time constants |

License

AGPL-3.0