Add melody with lyrics
add_melodyCreates new sung notes in an OpenUtau part from lyrics and an optional pitch-and-beat melody, so you can write vocal phrases with controlled timing and durations.
Instructions
Write a sung phrase as new notes from start_tick. With melody: one lyric per sounding note (must match; "+" holds a syllable; lyrics optional). Without melody: one note per lyric, with durations and tones. Use add_notes for exact notes, set_lyrics to change the words of existing notes. Returns lyrics (the split), warnings, added, part_duration, note_count. / 歌詞とメロディから新しい音符を作ります。melody ありなら音の数と歌詞の 数が一致する必要があります(「+」で伸ばす)。melody なしなら durations・tones で並べます。既存の音符の歌詞は set_lyrics。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"part": "<part>"
},
"name": "add_melody"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | Yes | Voice part index from 0, counting voice parts only (see get_project voice_parts). / ボイスパート番号(0 から、ボイスパートのみ数える) | |
| path | No | A .ustx file to edit directly (OpenUtau may be closed). Omit to use the project open in OpenUtau (needs the bridge). / 直接編集する .ustx ファイル(OpenUtau は閉じていて可)。省略で OpenUtau のプロジェクト | |
| tones | No | Without melody: pitch(es); a list's last value repeats (default C4 = 60). / 音高 | |
| lyrics | No | Lyrics text, split into one lyric per note (e.g. "さくら さくら" or "Hel-lo world"). / 歌詞テキスト | |
| melody | No | Space-separated PITCH:BEATS, r = rest, beats in quarter notes (decimals or 1/2), e.g. "A4:1 A4:1 B4:2 r:1/2 C5:3/2". / 「音名:拍」の並び(r = 休符) | |
| language | No | Lyric language: "auto" (default, detected), "ja" or "en". / 歌詞の言語(auto / ja / en) | auto |
| durations | No | Without melody: note length(s) in ticks; a list's last value repeats (default 480). / 長さ(ティック) | |
| start_tick | No | Tick of the first note, relative to the part. / 最初の音符の位置 |