Music production from lyrics to mastered track
- Published
Creating a finished song from scratch is a multi-stage process. You need lyrics, melody composition, production arrangements, mixing, and finally mastering. Most musicians bounce between applications, exporting files manually at each step, waiting for processing, and dealing with format conversions. It's tedious and error-prone.
What if you could write lyrics, feed them into an AI composition tool, have that output automatically sent to a mastering service, and receive a finished, polished track without ever leaving your workflow? That's the promise of combining Jammable AI with LANDR through an orchestration platform. The two tools handle their specialties, and the orchestration layer handles the handoffs.
This workflow sits at the advanced end because you're managing API authentication, monitoring job statuses, handling file uploads and downloads, and chaining multiple asynchronous processes together. But the payoff is significant: you eliminate hours of manual labour and create a repeatable system for music production at scale.
The Automated Workflow
This workflow uses Jammable AI to generate a full production from lyrics, then automatically sends that output to LANDR for mastering. We'll walk through the implementation using n8n as the orchestration engine, though Make and Zapier can achieve similar results with slightly different syntax.
Why n8n for this workflow?
n8n handles long-running jobs, file operations, and complex branching logic better than Zapier's simple automation model. Zapier works for straightforward triggers and actions, but orchestrating a multi-minute music generation job followed by asynchronous mastering requires better job queuing and error handling. Make is comparable to n8n; both work well here. We'll focus on n8n because its visual interface makes the workflow transparent.
Architecture overview
The workflow executes in these stages:
- Receive lyrics via a webhook or manual trigger
- Call Jammable AI's composition endpoint with the lyrics
- Poll Jammable's API until the track is ready
- Download the generated audio file
- Upload that file to LANDR for mastering
- Poll LANDR until mastering completes
- Download the mastered track and store it
Setting up authentication
First, create credentials in n8n for both services. You'll need API keys from both Jammable AI and LANDR.
For Jammable AI, log into your account and generate an API key from the dashboard. Store this in n8n as a credential type "Custom API Key":
Header name: Authorization
Header value: Bearer YOUR_JAMMABLE_API_KEY
For LANDR, follow the same process:
Header name: Authorization
Header value: Bearer YOUR_LANDR_API_KEY
Step 1: Webhook trigger
Create a webhook node in n8n that listens for incoming requests. This allows external applications or manual triggers to start the workflow.
POST /webhook/music-production
Content-Type: application/json
{
"lyrics": "Verse 1\nChorus\nVerse 2\nChorus\nBridge",
"genre": "indie-pop",
"tempo": 120,
"key": "C major",
"style": "upbeat"
}
n8n generates the URL automatically when you create the webhook node. You can test it by sending a POST request with curl or Postman.
Step 2: Call Jammable AI composition endpoint
Add an HTTP Request node to call Jammable's API. The endpoint for generating music from lyrics is:
POST https://api.jammable.ai/v1/compositions/generate
Content-Type: application/json
Authorization: Bearer YOUR_JAMMABLE_API_KEY
{
"lyrics": "{{ $json.lyrics }}",
"genre": "{{ $json.genre }}",
"tempo": "{{ $json.tempo }}",
"key": "{{ $json.key }}",
"style": "{{ $json.style }}",
"format": "wav"
}
The response includes a composition ID and a status field:
{
"id": "comp_1234567890abc",
"status": "processing",
"created_at": "2024-01-15T10:30:00Z",
"estimated_completion": 180
}
Store this composition ID because you'll need it for polling.
Step 3: Poll until composition is ready
Jammable generates music asynchronously. A composition might take two to five minutes depending on length and complexity. You need to poll the status endpoint until the composition is complete.
Create a Loop node with a condition. Inside the loop, make an HTTP request to:
GET https://api.jammable.ai/v1/compositions/{{ $json.compositionId }}/status
Authorization: Bearer YOUR_JAMMABLE_API_KEY
The response looks like:
{
"id": "comp_1234567890abc",
"status": "completed",
"audio_url": "https://storage.jammable.ai/comp_1234567890abc.wav",
"duration_seconds": 240,
"completed_at": "2024-01-15T10:34:30Z"
}
Configure the loop to check every 10 seconds and timeout after 600 seconds (10 minutes). In n8n, this means setting the loop to:
- Continue while:
$json.status !== "completed" - Wait between iterations: 10 seconds
- Maximum iterations: 60
If status is "failed", the loop should exit and trigger an error notification.
Step 4: Download the generated audio
Once the composition status is "completed", you receive an audio_url. Use a Binary Data node to download this file:
GET {{ $json.audio_url }}
n8n stores this as binary data in memory, which you'll pass directly to LANDR in the next step. No need to save to disk.
Step 5: Upload to LANDR for mastering
LANDR's API expects a multipart form upload. Create an HTTP Request node configured as:
POST https://api.landr.com/v2/upload
Authorization: Bearer YOUR_LANDR_API_KEY
Content-Type: multipart/form-data
Form data:
- file: [binary audio data from previous step]
- title: "Generated Track"
- artist: "AI Producer"
LANDR's response includes a master ID:
{
"id": "master_9876543210xyz",
"status": "queued",
"title": "Generated Track",
"artist": "AI Producer",
"created_at": "2024-01-15T10:35:00Z"
}
Save this master ID for polling.
Step 6: Poll LANDR until mastering completes
Similar to the Jammable polling, create another Loop node:
GET https://api.landr.com/v2/masters/{{ $json.masterId }}/status
Authorization: Bearer YOUR_LANDR_API_KEY
LANDR's mastering typically completes within 60 to 120 seconds. The response:
{
"id": "master_9876543210xyz",
"status": "completed",
"results": {
"master_url": "https://landr-downloads.s3.amazonaws.com/master_9876543210xyz.wav",
"stems": []
},
"completed_at": "2024-01-15T10:36:15Z"
}
Configure this loop to check every 5 seconds and timeout after 300 seconds (5 minutes).
Step 7: Store and notify
Once mastering is complete, download the final master file and store it somewhere persistent. Options include:
- AWS S3 via n8n's S3 node
- Google Cloud Storage
- A webhook callback to your own application
- Dropbox or Google Drive
For a simple implementation, use a webhook to notify your application:
POST https://your-domain.com/api/workflow/complete
Content-Type: application/json
{
"status": "success",
"composition_id": "{{ $json.compositionId }}",
"master_id": "{{ $json.masterId }}",
"master_url": "{{ $json.masterUrl }}",
"completed_at": "{{ $json.completedAt }}"
}
Putting it together in n8n
The workflow nodes in order:
- Webhook node (trigger)
- HTTP Request to Jammable composition endpoint
- Loop with HTTP polling for Jammable status
- Binary Data node to download audio
- HTTP Request to LANDR upload endpoint
- Loop with HTTP polling for LANDR status
- HTTP Request to notify your application
Connect each node's output to the next node's input. The n8n interface shows data flow visually, making it easy to debug.
The Manual Alternative
If you prefer more control or want to test each stage independently, the manual process is straightforward.
Call Jammable's API directly with curl:
curl -X POST https://api.jammable.ai/v1/compositions/generate \
-H "Authorization: Bearer YOUR_JAMMABLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lyrics": "Your lyrics here",
"genre": "indie-pop",
"tempo": 120,
"key": "C major",
"style": "upbeat",
"format": "wav"
}'
Check the status periodically:
curl https://api.jammable.ai/v1/compositions/comp_1234567890abc/status \
-H "Authorization: Bearer YOUR_JAMMABLE_API_KEY"
Once ready, download the audio file:
curl -O https://storage.jammable.ai/comp_1234567890abc.wav
Then upload to LANDR using a tool like Postman or a script:
curl -X POST https://api.landr.com/v2/upload \
-H "Authorization: Bearer YOUR_LANDR_API_KEY" \
-F "file=@/path/to/composition.wav" \
-F "title=Generated Track" \
-F "artist=AI Producer"
Check mastering progress:
curl https://api.landr.com/v2/masters/master_9876543210xyz/status \
-H "Authorization: Bearer YOUR_LANDR_API_KEY"
This approach gives you full visibility at each step. You can inspect outputs, modify parameters, and retry individual steps. The tradeoff is that it requires manual intervention and isn't repeatable at scale.
Pro Tips
Handle rate limiting gracefully
Both Jammable and LANDR enforce rate limits. Jammable allows 10 API calls per minute on starter plans; LANDR allows 100 requests per hour. In your polling loops, add exponential backoff. Instead of checking every 5 seconds consistently, check every 5 seconds for the first minute, then every 15 seconds thereafter.
In n8n, use a variable to track attempts and adjust wait times:
if ($json.attempts < 12) {
return 5000; // 5 seconds
} else {
return 15000; // 15 seconds after first minute
}
Monitor composition quality
Jammable AI's output quality varies with prompt specificity. Vague lyrics produce generic results. Detailed lyrics with clear structure (verse, chorus, bridge markers) produce better compositions. Test your prompts manually first before automating them.
Store metadata for auditing
Each workflow execution should log the composition ID, master ID, timestamps, and file URLs. This helps with debugging and provides an audit trail. Add a database step at the end to store these details:
{
"execution_id": "workflow_12345",
"composition_id": "comp_1234567890abc",
"master_id": "master_9876543210xyz",
"started_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:36:15Z",
"total_duration_seconds": 375,
"master_url": "https://landr-downloads.s3.amazonaws.com/master_9876543210xyz.wav"
}
Set timeout thresholds appropriately
Jammable compositions can take up to 10 minutes for longer tracks. LANDR mastering typically completes within 2 minutes but occasionally takes longer under heavy load. Set your loop timeouts conservatively (600 seconds for Jammable, 300 seconds for LANDR) to avoid premature failures.
Cache successful compositions
If you generate the same composition multiple times, cache the result and skip regeneration. Before calling Jammable, check if a composition with identical lyrics, genre, tempo, and style already exists in your database. Reusing a cached file saves API calls and time.
Cost Breakdown
| Tool | Plan Needed | Monthly Cost | Notes |
|---|---|---|---|
| Jammable AI | Starter | £9.99 | 10 compositions/month included; overage £2 per composition. Suitable for testing. Pro tier at £29.99 includes 100 compositions. |
| LANDR | Studio | $9.99 | 30 masters/month. Overage at $0.40 per master. Ideal for this workflow. |
| n8n (self-hosted) | Free | £0 | Self-hosted instance on your own server. Requires DevOps overhead. |
| n8n (cloud) | Pro | $20 | Better for hands-off operation. Includes 10,000 workflow executions/month. |
| Make (Integromat) | Free | £0 | 1,000 operations/month. Each Jammable or LANDR call counts as one operation. Feasible for low-volume workflows. |
| Zapier | Free | £0 | 100 tasks/month. Task-heavy; likely insufficient for this workflow. |
For a personal music producer generating 5 compositions monthly, expect £19.98 to £39.98 from Jammable and LANDR alone. Add n8n cloud hosting at $20 if you want a managed solution. Self-hosting n8n costs nothing but requires server maintenance.
For a studio automating 50 tracks monthly, costs scale more efficiently. Jammable Pro (£29.99) covers 100 compositions. LANDR Studio at $9.99 handles 30 masters; you'd need to pay $8 for overage (20 additional masters at $0.40 each), totalling £39.98 monthly for tools plus orchestration.
The orchestration tool is the biggest variable. Zapier's free tier exhausts quickly; Make is more suitable at 1,000 free operations. n8n self-hosted is cheapest at scale but demands infrastructure knowledge. n8n cloud at $20 monthly is the balanced choice for reliability.
More Recipes
Automated Podcast Production Workflow
Automated Podcast Production Workflow: From Raw Audio to Published Episode
Build an Automated YouTube Channel with AI
Build an Automated YouTube Channel with AI
Medical device regulatory documentation from technical specifications
Medtech companies spend significant resources translating technical specs into regulatory-compliant documentation.