Skip to content

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.json
name: write-song
description: |
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 chords

Usage

Terminal window
$ conductor run examples/write-song/workflow.yaml
genre: blues
topic: morning coffee
key (C Major):

Conductor prompts for required inputs. Press Enter to accept the default key (C Major), or specify a different one:

Terminal window
genre: folk
topic: coming home
key (C Major): G Major

Inputs

NameTypeRequiredDefaultDescription
genrestringyes-Musical genre (blues, folk, country, rock, jazz, etc.)
topicstringyes-What the song is about
keystringnoC MajorMusical key (C Major, G Major, A minor, etc.)

How It Works

The LLM:

  1. Picks a song structure authentic to the genre (12-bar blues, verse-chorus, AABA, etc.)
  2. Uses chords diatonic to the specified key
  3. Writes genre-appropriate progressions (I-IV-V for blues, I-V-vi-IV for pop, etc.)
  4. 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