import { LyricsEntry } from "./LyricsEntry" ; import { VoiceEntry } from "../VoiceEntry" ; export class LyricWord { private syllables : LyricsEntry [ ] = [ ] ; public get Syllables ( ) : LyricsEntry [ ] { return this . syllables ; } public containsVoiceEntry ( voiceEntry ) { for ( let idx = 0 , len = this . Syllables . length ; idx < len ; ++ idx ) { const lyricsEntry = this . Syllables [ idx ] ; if ( lyricsEntry . Parent === voiceEntry ) { return true ; } } return false ; } public findLyricEntryInVoiceEntry ( voiceEntry ) { for ( let idx = 0 , len = this . Syllables . length ; idx < len ; ++ idx ) { const lyricsEntry = this . Syllables [ idx ] ; if ( lyricsEntry . Parent === voiceEntry ) { return lyricsEntry ; } } } }