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

dawparse

v1.0.0

Published

FLP parsing and serialization library for browser and Node.js

Readme

dawparse

CI

A lightweight, high-performance, and type-safe parser and serializer for DAW (Digital Audio Workstation) projects. It supports browser (Web) and Node.js (Backend) environments with zero platform dependencies.

Currently, dawparse supports parsing and serializing FL Studio Project files (.flp) and Zipped Loop Packages (.zip), with a modular architecture built to scale to other DAWs (like Ableton, Reaper, etc.) in the future.


Features

  • Zero Platform Dependencies: Built using standard JavaScript Uint8Array, DataView, and TextDecoder. Works in any JS environment (Browsers, Node.js, Deno, Bun).
  • Scalable DAW Architecture: A modular folder structure separating DAW-specific formats (e.g. flstudio) from shared binary reading/writing primitives (BufferReader and BufferWriter).
  • Object-Oriented API: Simple, clean class wrappers for DAW project files supporting instantiation via local file paths (Node.js) or buffers (Web/Node.js).
  • Zipped Loop Package (.zip) Support: Decompress zipped packages directly, retrieving the project file and associated audio assets.
  • Bi-directional Parsing & Serialization: Read projects, modify their structures, and compile them back into binary format with 100% data fidelity.

Installation

npm install dawparse

Quick Start (Object-Oriented API)

The FLP class represents an FL Studio project and wraps both parsing and serialization.

1. Parsing a Zipped Loop Package (Node.js & Web)

You can pass either a local file path (Node.js only) or a binary array buffer (Web and Node.js).

import { FLP } from 'dawparse';

// Instantiating via a string path (Node.js)
const zip = new FLP({
  zip: './my_project.zip'
});

console.log('Main project filename:', zip.flpName); // "untitled.flp"
console.log('Project PPQ:', zip.project.header.ppq); // 96

// Retrieve packed audio/sample files
const kickSampleBytes = zip.files?.['Basic 808 Kick.wav'];
if (kickSampleBytes) {
  console.log('Kick Sample Size:', kickSampleBytes.length, 'bytes');
}

2. Parsing a Raw .flp File (Web / Browser)

For browser environments, retrieve files as buffers and instantiate:

import { FLP } from 'dawparse';

const inputElement = document.querySelector('input[type="file"]');
inputElement.addEventListener('change', async (event) => {
  const file = event.target.files[0];
  const arrayBuffer = await file.arrayBuffer();

  // Instantiate from buffer
  const flp = new FLP({
    file: new Uint8Array(arrayBuffer)
  });

  console.log('FLP Magic:', flp.project.header.magic); // "FLhd"
  console.log('Format:', flp.project.header.fmt);
});

3. Modifying and Saving a Project

import * as fs from 'fs';
import { FLP } from 'dawparse';

const flp = new FLP({ file: './song.flp' });

// Modify project comments
const commentsEvent = flp.project.events.find(e => e.id === 195);
if (commentsEvent) {
  commentsEvent.value = 'Updated project comments!';
}

// Serialize back to binary Uint8Array
const outputBuffer = flp.serialize();
fs.writeFileSync('song_modified.flp', outputBuffer);

Shared Binary Core (DRY Principle)

dawparse exposes BufferReader and BufferWriter classes under shared/ to simplify reading and writing binary files in an extensible way. You can leverage them to build new DAW parsers:

import { BufferReader, BufferWriter } from 'dawparse';

const reader = new BufferReader(bytes);
const magic = reader.readString(4);
const channels = reader.readInt16();

const writer = new BufferWriter();
writer.writeString('MAGIC');
writer.writeInt16(2);
const finalBytes = writer.getBuffer();

Running Tests

We use Vitest for testing:

# Run all tests
npm run test

# Run tests in watch mode
npm run test:watch

# Run only ZIP package tests (including real-file test)
npx vitest run test/zip.test.ts

Implementing Other DAWs

For details and structural templates on how to implement support for other DAW files (such as Ableton .als or Reaper .RPP), refer to the DAW.md documentation guide.


License

MIT