UNPKG

@holzchopf/flp-file

Version:

Reads and writes FL Studio project and state files.

61 lines (60 loc) 1.51 kB
import { FLPEvent } from "./flp-event"; /** * The chunks in an FLPFile have a 4-byte ASCII-string indicated type. These are those types. */ export type FLPChunkType = 'FLhd' | 'FLdt'; /** * Class representing a chunk in an FLPFile. */ export declare abstract class FLPChunk { /** * Type of this chunk. */ type: FLPChunkType; /** * Creates the binary data for this chunk and returns it. */ abstract getBinary(): ArrayBuffer; /** * Sets this chunk's values from binary data. * @param buffer Binary data. */ abstract setBinary(buffer: ArrayBuffer): void; constructor(type: FLPChunkType); } /** * Specific class for the header chunk. */ export declare class FLPHeaderChunk extends FLPChunk { /** * Numeric file format identifier. */ format: number; /** * Name of file format. */ get formatName(): "unknown" | "Project" | "Score" | "Automation" | "ChannelState" | "PluginState" | "GeneratorState" | "EffectState" | "InsertState"; /** * Number of channels. */ channelCnt: number; /** * Project PPQ. */ ppq: number; getBinary(): ArrayBuffer; setBinary(buffer: ArrayBuffer): void; constructor(); } /** * Specific class for the data chunk. */ export declare class FLPDataChunk extends FLPChunk { /** * FLPEvents in this chunk. */ events: FLPEvent[]; getBinary(): ArrayBuffer; setBinary(buffer: ArrayBuffer): void; constructor(); }