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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@holzchopf/flp-file

v1.0.0

Published

Reads and writes FL Studio project and state files.

Downloads

4

Readme

This file was auto-generated with zdoccer.js 2.0.3

Index


original Markdown from src/_preamble.md

@holzchopf/flp-file

Allows to read and write FL Studio project and state files.


transformed Javadoc from src/flp-chunk.ts

type FLPChunkType = 'FLhd' | 'FLdt'

The chunks in an FLPFile have a 4-byte ASCII-string indicated type. These are those types.

abstract class FLPChunk

Class representing a chunk in an FLPFile.

type: FLPChunkType

Type of this chunk.

abstract getBinary(): ArrayBuffer

Creates the binary data for this chunk and returns it.

abstract setBinary(buffer: ArrayBuffer): void

Sets this chunk's values from binary data.

  • param buffer — Binary data.

class FLPHeaderChunk extends FLPChunk

Specific class for the header chunk.

format: number = -1

Numeric file format identifier.

get formatName()

Name of file format.

channelCnt: number = 0

Number of channels.

ppq: number = 96

Project PPQ.

class FLPDataChunk extends FLPChunk

Specific class for the data chunk.

events: FLPEvent[] = []

FLPEvents in this chunk.


transformed Javadoc from src/flp-event-type.ts

type FLPEventTypeName = keyof typeof FLPEventTypeRaw

Known event names.

type FLPEventTypeId = typeof FLPEventTypeRaw[FLPEventTypeName]

Known event IDs.

const FLPEventType =

Types of the events in an FLPDataChunk .

name: (id: number): FLPEventTypeName | 'unknown' =>

Returns the name of a given event ID, or 'unknown'.

  • param id — Event ID.

byName: (name: string): FLPEventTypeId | undefined =>

Returns the ID for a given event name, or undefined

  • param name — Event name.

transformed Javadoc from src/flp-event.ts

type FLPDataType = 'int8' | 'int16' | 'int32' | 'uint8' | 'uint16' | 'uint32' | 'float32' | 'binary' | 'ascii' | 'utf-16le'

Possible data types for event values.

let FLPEventValueDataType: Partial<Record<FLPEventTypeName, FLPDataType>> =

Data types for event's values. Falls back to uint8 for event ids < 64, uint16 for event ids < 128, uint32 for event ids < 192, utf-16le for event ids < 210, binary otherwise.

This is not a const - you can add or overwrite types for events in your project.

class FLPEvent

Class for events.

type: number

Numeric FLPEventType .

get typeName()

Name of FLPEventType . Readonly.

value: number | string | ArrayBuffer

Primitive representation of event data. Data type varies by event type.

get maxByteLength()

Returns the maximum allowed byte length depending on event type.

getBinary(): ArrayBuffer

Creates the binary data for this event and returns it.

setBinary(buffer: ArrayBuffer)

Sets this event's values from binary data.

  • param buffer — Binary data.

static getValueDataType(type: number | FLPEventTypeName): FLPDataType

Returns the expected data type for a given event type.

  • param type — Event type.

transformed Javadoc from src/flp-file-format.ts

type FLPFileFormatName = keyof typeof FLPFileFormatRaw

Known file format names.

type FLPFileFormatId = typeof FLPFileFormatRaw[FLPFileFormatName]

Known file format IDs.

const FLPFileFormat =

Specific file formats of FLPFile s.

name: (id: number): FLPFileFormatName | 'unknown' =>

Returns the name of a given file format ID, or 'unknown'

  • param id — File format ID.

byName: (name: string): FLPFileFormatId | undefined =>

Returns the ID for a given file format name, or undefined

  • param name — File format name.

transformed Javadoc from src/flp-file.ts

class FLPFile

Class representing an FL Studio file, which might be a project file (.flp). But other FL Studio files, like state files (.fst) have the same format.

Every FLPFile consists of two chunks:

  • A header chunk, containing file and global project information.
  • A data chunk, containing event data.

header: FLPHeaderChunk

Header chunk.

data: FLPDataChunk

Data chunk.

getBinary(): ArrayBuffer

Creates the binary data for this file and returns it.

setBinary(buffer: ArrayBuffer)

Sets this files's values from binary data.

  • param buffer — Binary data.