Nodes/ComfyUI MIDI Edit/MIDI Edit Lyrics
ComfyUI Node

MIDI Edit Lyrics

Replace lyrics in MIDI JSON with new text and auto-generate phonemes. Smart matching: splits lyrics by newlines/punctuation into sentences, each mapped to a MIDI section. If new sentence is shorter than original, extra characters keep original text. If longer, automatically splits the longest-duration note (pitch unchanged, duration halved) to create more positions. Consecutive repeated characters in original are grouped (e.g. '向向' → slot with count 2) and expanded accordingly. Chinese chars → zh_ pinyin; English → en_ phonemes. Force Tone 4: forces Chinese phonemes at pitch >= threshold to tone 4. Fixed Pause (default ON): keep SP durations unchanged. Flexible Pause: when tokens are crowded or SP is overly long, redistribute SP time proportionally to tokens. Split Mode: 'token' = allocate chars by original token count proportion; 'duration' = allocate chars by original section duration proportion. Speed: adjust playback speed (1.0 = normal, >1 faster, <1 slower). Duration and f0 are scaled proportionally.

By ahkimkoo·Created 2 months ago·Updated 2 months ago· 3
MIDI Edit Lyrics
    • midi_json
    midi_json
    new_lyrics
    force_tone4false
    high_pitch_threshold79
    fixed_pausetrue
    split_modetoken
    speed1.0
    CategoryMIDI-Edit

    Inputs (7)

    NameTypeDefaultDescription
    midi_jsonSTRING
    new_lyricsSTRING
    force_tone4BOOLEANfalse
    high_pitch_thresholdINT790–127
    fixed_pauseBOOLEANtrue
    split_modeCOMBOtoken2 options: token, duration
    speedFLOAT1.00.1–3

    Outputs (1)

    NameTypeDescription
    midi_jsonSTRING