Write Song
Generate songs with lyrics and chord symbols. The LLM picks an authentic song structure for the genre and uses chords diatonic to the specified key.
Workflow Definition
# yaml-language-server: $schema=../../schemas/workflow.schema.jsonname: write-songdescription: | Generate a song with lyrics and chord symbols. The LLM picks an authentic song structure for the genre (12-bar blues, verse-chorus, AABA, etc.) and uses chords diatonic to the specified key.version: "1.0"
inputs: - name: genre type: string required: true description: Musical genre (e.g., blues, folk, country, rock, jazz) - name: topic type: string required: true description: What the song is about - name: key type: string default: "C Major" description: Musical key (e.g., C Major, G Major, A minor)
steps: - id: compose name: Compose Song type: llm model: balanced prompt: | Write a short {{.inputs.genre}} song about "{{.inputs.topic}}" in the key of {{.inputs.key}}.
Use a song structure authentic to {{.inputs.genre}} (e.g., 12-bar blues, verse-chorus, AABA, etc.). Include chord symbols above the lyrics, using chords diatonic to {{.inputs.key}} with progressions that fit the style.
outputs: - name: song type: string value: "{{.steps.compose.response}}" description: The generated song with lyrics and chordsUsage
$ conductor run examples/write-song/workflow.yaml
genre: bluestopic: morning coffeekey (C Major):Conductor prompts for required inputs. Press Enter to accept the default key (C Major), or specify a different one:
genre: folktopic: coming homekey (C Major): G MajorInputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| genre | string | yes | - | Musical genre (blues, folk, country, rock, jazz, etc.) |
| topic | string | yes | - | What the song is about |
| key | string | no | C Major | Musical key (C Major, G Major, A minor, etc.) |
How It Works
The LLM:
- Picks a song structure authentic to the genre (12-bar blues, verse-chorus, AABA, etc.)
- Uses chords diatonic to the specified key
- Writes genre-appropriate progressions (I-IV-V for blues, I-V-vi-IV for pop, etc.)
- Formats with chord symbols above lyrics
Example Genres
- blues - 12-bar blues with AAB lyric structure, dominant 7th chords
- folk - Verse-chorus with simple progressions, often in major keys
- country - Storytelling verses, singable choruses, I-IV-V progressions
- jazz - AABA form, extended chords (maj7, min7, dom7)
- rock - Power chord progressions, verse-chorus-bridge structure