StaticcreateCreates an instrument object with specified properties, including sample data, slices, automation settings, and other configurations.
OptionalwavBuffer: ArrayBufferAn optional WAV file buffer containing the sample data for the instrument. If not provided, a default empty buffer is used.
Optionalslices: number[]An optional array of slice start positions for beat slicing mode. If not provided, no slices are defined.
The constructed instrument object containing all the properties needed for playback and processing.
StaticcreateCreates a pattern structure with the specified number of tracks and steps.
The number of tracks to include in the pattern. Should either be 12 (for OG Tracker) or 16 (for Tracker+ and Mini).
The number of steps per track in the pattern. Min: 1, Max: 128.
An object containing the pattern data, including header, tracks, and other metadata.
StaticcreateGenerates metadata for a set of patterns.
An array of pattern names to include in the metadata.
The metadata object containing header information and the provided pattern names.
StaticcreateCreates a new project with default configurations and the specified project name.
The name of the project to be created. Max 32 characters. Will be truncated if longer.
The newly created project data object containing header information, project settings, and initial values.
StaticreadReads and parses instrument data from a provided .pti file.
A promise that resolves to the parsed InstrumentData if successful, or null if the data cannot be read or parsed.
StaticreadReads a pattern from the specified file and parses it into a PatternData object.
The file to read the pattern data from. Can be a file path or a File object.
A promise that resolves to a PatternData object if parsing is successful, or null if the input cannot be processed.
StaticreadReads and parses the patterns metadata from the given file.
The file to read the patterns metadata from. Can be a file path or a File object.
A promise that resolves to the parsed patterns metadata if successful, or null if the file content is invalid or cannot be processed.
StaticreadReads and parses a project file into a ProjectData object.
The file path or File object to be read and parsed.
A promise that resolves to a ProjectData object if parsing is successful, or null if the input is not valid.
StaticwriteWrites the provided instrument data to a file in the specified format.
The instrument data to be written to the file.
Optionalfilename: stringOptional filename to write the instrument data.
If not provided, the default filename will be derived from the instrument's sample filename with a .pti extension.
A promise that resolves when the file has been successfully written.
StaticwriteWrites a given pattern to a file. The pattern data is serialized and saved to the specified filename. If no filename is provided, a default name is used.
The pattern data to be written to the file.
Optionalfilename: stringOptional. The name of the file to write to. Defaults to "pattern.mtp".
A promise that resolves when the file has been successfully written.
StaticwriteWrites the given patterns metadata to the appropriate storage or file system.
The metadata object containing patterns information to be written.
A promise that resolves when the metadata is successfully written.
StaticwriteWrites the provided project data to the appropriate storage or system.
The project data to be written.
A promise that resolves when the project data has been successfully written.
Read and write Tracker Projects, Patterns and Instrument files.