UNPKG

@ioris/core

Version:

This package provides the core functionality for the [@ioris](https://www.npmjs.com/search?q=%40ioris) ecosystem for managing music lyrics with time synchronization.

35 lines (34 loc) 1.37 kB
/** * Editing API - Shift functions * Batch timing shift for multiple Word/Line/Paragraph */ import type { ValidationResult } from "../../schemas/result"; import type { Lyric } from "../../types"; /** * Batch timing shift for multiple Words */ export declare function shiftWords(lyric: Lyric, wordIDs: string[], offsetSec: number): ValidationResult<Lyric>; /** * Batch timing shift for multiple Lines */ export declare function shiftLines(lyric: Lyric, lineIDs: string[], offsetSec: number): ValidationResult<Lyric>; /** * Batch timing shift for multiple Paragraphs */ export declare function shiftParagraphs(lyric: Lyric, paragraphIDs: string[], offsetSec: number): ValidationResult<Lyric>; /** * Shift all elements within a time range */ export declare function shiftRange(lyric: Lyric, beginTime: number, endTime: number, offsetSec: number): ValidationResult<Lyric>; /** * Adjust the begin time of a Word */ export declare function adjustWordBegin(lyric: Lyric, wordID: string, newBegin: number): ValidationResult<Lyric>; /** * Adjust the end time of a Word */ export declare function adjustWordEnd(lyric: Lyric, wordID: string, newEnd: number): ValidationResult<Lyric>; /** * Adjust both begin and end times of a Word */ export declare function adjustWordTiming(lyric: Lyric, wordID: string, newBegin: number, newEnd: number): ValidationResult<Lyric>;