
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Minimalist TypeScript library for parsing and modifying FL Studio project files (.flp)
A minimalist TypeScript library for reading and modifying FL Studio project files (.flp).
Designed for non-destructive modifications ("conservative patch").
npm install ts-flp
# or
pnpm add ts-flp
# or
yarn add ts-flp
import { readFileSync, writeFileSync } from 'fs';
import { parseFlp, serializeFlp, readProjectMeta, listSamples, listPlugins } from 'ts-flp';
// Load and parse the .flp file
const buffer = readFileSync('my-project.flp');
const parsed = parseFlp(buffer);
// Read metadata
const meta = readProjectMeta(parsed);
console.log(`Project: ${meta.name}`);
console.log(`Artist: ${meta.artist}`);
console.log(`Genre: ${meta.genre}`);
console.log(`BPM: ${meta.bpm}`);
// List samples
const samples = listSamples(parsed);
for (const sample of samples) {
console.log(`Sample: ${sample.path}`);
}
// List plugins
const plugins = listPlugins(parsed);
for (const plugin of plugins) {
console.log(`Plugin: ${plugin.name} (${plugin.vendor ?? 'N/A'})`);
}
import { readFileSync, writeFileSync } from 'fs';
import { parseFlp, serializeFlp, writeProjectMeta } from 'ts-flp';
const buffer = readFileSync('my-project.flp');
let parsed = parseFlp(buffer);
// Modify metadata
parsed = writeProjectMeta(parsed, {
name: 'New Title',
artist: 'My Name',
genre: 'Electronic',
bpm: 140,
});
// Save
writeFileSync('my-project-modified.flp', serializeFlp(parsed));
import { readFileSync, writeFileSync } from 'fs';
import { parseFlp, serializeFlp, rewriteSamplePaths } from 'ts-flp';
const buffer = readFileSync('my-project.flp');
let parsed = parseFlp(buffer);
// Remap paths (e.g., disk migration)
parsed = rewriteSamplePaths(parsed, (oldPath) => {
return oldPath.replace('D:\\Samples\\', 'E:\\NewSamples\\');
});
writeFileSync('my-project-migrated.flp', serializeFlp(parsed));
import { readFileSync, writeFileSync } from 'fs';
import { parseFlp, serializeFlp, readProjectTimeInfo, writeProjectTimeInfo } from 'ts-flp';
const buffer = readFileSync('my-project.flp');
let parsed = parseFlp(buffer);
// Read time info
const timeInfo = readProjectTimeInfo(parsed);
console.log(`Created on: ${timeInfo.creationDate}`);
console.log(`Work time: ${timeInfo.workTimeSeconds} seconds`);
// Modify creation date
parsed = writeProjectTimeInfo(parsed, {
creationDate: new Date('2024-01-01'),
workTimeSeconds: 3600, // 1 hour
});
writeFileSync('my-project-modified.flp', serializeFlp(parsed));
interface ProjectMeta {
name: string | null;
description: string | null;
artist: string | null;
genre: string | null;
bpm: number | null;
}
interface ProjectTimeInfo {
creationDate: Date | null;
workTimeSeconds: number | null;
}
interface SampleRef {
eventIndex: number;
path: string;
}
interface PluginRef {
name: string | null;
vendor: string | null;
}
| Function | Description |
|---|---|
parseFlp(buffer) | Parse a .flp buffer into a ParsedFlp structure |
serializeFlp(parsed) | Serialize a ParsedFlp structure to buffer |
readProjectMeta(parsed) | Read project metadata |
writeProjectMeta(parsed, meta) | Modify project metadata |
readProjectTimeInfo(parsed) | Read time information |
writeProjectTimeInfo(parsed, info) | Modify time information |
listSamples(parsed) | List all samples in the project |
rewriteSamplePaths(parsed, mapper) | Batch rewrite sample paths |
listPlugins(parsed) | List all plugins (VST and native) |
getFlVersion(parsed) | Get the FL Studio version string |
getPPQ(parsed) | Get the PPQ (Pulses Per Quarter note) |
.flp files.flp files from scratchvendor availability (returns null if not serialized).flp filessrc/
generated/
events.generated.ts # Event constants
io/
BinaryReader.ts # Binary reading
BinaryWriter.ts # Binary writing
parser/
FlpParser.ts # .flp Parser/Serializer
api/
ProjectApi.ts # High-level API
index.ts # Entry point
# Install dependencies
pnpm install
# Type checking
pnpm run typecheck
# Tests
pnpm run test
# Build
pnpm run build
A huge thank you to @demberto (PyFLP), @monadgroup (FLParser), and FLPEdit for their incredible reverse-engineering work on the FL Studio .flp format.
This project would never have been possible without them.
FAQs
Minimalist TypeScript library for parsing and modifying FL Studio project files (.flp)
The npm package ts-flp receives a total of 141 weekly downloads. As such, ts-flp popularity was classified as not popular.
We found that ts-flp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.