UNPKG

dxex

Version:

Create and parse sysex for Yamaha DX synthesizers.

65 lines (64 loc) 1.55 kB
import { DX21Voice } from './index'; interface DXResolveOptions { mode?: 'bulk1' | 'bulk32'; } export declare type VoiceType = 1 | 32; /** * Class for interacting with DX21 synthesizers. */ export declare class DX21 { params: DX21Voice[] | null; readonly voiceType: number; constructor(voiceType: VoiceType); /** * Parse DX sysex data. * @param {number} data * @return {DX21Voice[] | null} */ parse(data: number[]): DX21Voice[] | null; /** * Resolve sysex data. * @param {DX21Voice} data The data to resolve. * @param {DXResolveOptions} options * @return {number[]} */ resolve(data: DX21Voice[], options: DXResolveOptions): number[]; /** * Parse a VCED format chunk. * @param {number[]} chunk * @return {DX21Voice} */ private _parseVCED; /** * Parse a VMEM format chunk. * @param {number[]} chunk * @param {number[]} data * @return {object} */ private _parseVMEM; /** * Resolve a VCED format chunk. * @param {DX21Voice} data * @return {number[]} */ private _resolveVCED; /** * Resolve VMEM format chunk. * @param {DX21Voice} data * @return {number[]} */ private _resolveVMEM; /** * Create a checksum. * @param {data} data * @return {number} */ private _checksum; /** * Format voice name to 10-byte ASCII. * @param {string} voiceName * @return {number[]} */ private _formatVoiceName; } export {};