Plans and analyzes a song written in MTL text (render checks too); returns a share link that plays it in the browser (90 days, no render). Stages: plan, write, light analysis loop, one deep analysis, fix; then the share link to listen, or one render to embed. song(plan) gives a skeleton; analyze:true: light (repeatable); deep:true: measured (once). MTL steps: notes C4 C#4 Eb5, . rest, vNN volume 0-64, iN instrument (describe topic=mtl). Stopping a note: = releases it (its release plays out); an ECx effect cuts it dead after x ticks (_!EC0 on that step, D4!EC3 on the note). Each reply has a songId: send ref instead of the text again, with layers for batch edits (tracks, instruments, mix, order). It warns when a song is longer than one audio file holds (WAV about 8 min, Ogg or Opus longer). To work on a song in another program, convert it to MIDI or a tracker module. Schema ff675289.
View input schema
{
"type": "object",
"properties": {
"mtl": {
"type": "string",
"description": "Song in MTL text (describe topic=mtl). Kept 2 hours as a working copy: later calls can send ref (the songId) instead."
},
"ref": {
"type": "string",
"description": "Instead of mtl: a songId from an earlier reply (kept 2 hours), a render asset id, or a share link"
},
"compose": {
"type": "object",
"additionalProperties": true,
"description": "Instead of mtl: {bpm, form, chords, parts:[{id,gen}]}. describe(topic=\"generators\")"
},
"style": {
"type": "string",
"enum": [
"chip",
"fm",
"analog",
"clean"
],
"description": "Voice palette; default chip"
},
"return": {
"type": "string",
"enum": [
"summary",
"mtl"
],
"description": "mtl echoes the song back"
},
"genre": {
"type": "string",
"enum": [
"chiptune",
"chip-battle",
"game-overworld",
"game-battle",
"game-town",
"game-dungeon",
"game-menu",
"game-victory",
"game-racing",
"game-horror",
"jrpg",
"classical",
"baroque",
"fugue",
"minuet",
"romantic",
"march",
"waltz",
"nocturne",
"lullaby",
"hymn",
"carol",
"jazz",
"bebop",
"cool-jazz",
"swing",
"big-band",
"dixieland",
"ragtime",
"bossa-nova",
"smooth-jazz",
"fusion",
"jazz-ballad",
"gypsy-jazz",
"blues",
"slow-blues",
"jump-blues",
"shuffle",
"soul",
"gospel",
"rnb",
"funk",
"disco",
"rock",
"hard-rock",
"blues-rock",
"punk",
"pop-punk",
"metal",
"prog-rock",
"ska",
"pop",
"synth-pop",
"power-pop",
"dance-pop",
"power-ballad",
"kpop",
"musical-theater",
"country",
"bluegrass",
"folk",
"celtic",
"sea-shanty",
"polka",
"reggae",
"salsa",
"samba",
"tango",
"latin-pop",
"house",
"techno",
"trance",
"edm",
"synthwave",
"vaporwave",
"dubstep",
"drum-and-bass",
"breakbeat",
"trap",
"hip-hop",
"boom-bap",
"lofi",
"chillout",
"ambient",
"drone",
"new-age",
"industrial",
"cinematic",
"epic",
"suspense",
"horror",
"fantasy",
"western",
"spy",
"sci-fi",
"world",
"afrobeat",
"klezmer",
"bollywood"
],
"description": "Scores against this genre's factors (each genre scores its own); describe(topic=\"genres\")"
},
"check": {
"type": "boolean",
"description": "Same as analyze"
},
"analyze": {
"type": "boolean",
"description": "Light analysis: no audio, instant, free. Suited to every edit"
},
"range": {
"type": "string",
"description": "With analyze: one section, e.g. \"2\" or \"2-3\" (order entries)"
},
"compare": {
"type": "string",
"description": "With analyze: A/B against an earlier songId, asset id or share link"
},
"deep": {
"type": "boolean",
"description": "With analyze: deep analysis, a measured analysis-only render. Suited to once or twice when the song is nearly done"
},
"len": {
"type": "number",
"minimum": 1,
"maximum": 3600,
"description": "Target seconds"
},
"loop": {
"type": "boolean",
"description": "Should loop"
},
"alts": {
"type": "array",
"maxItems": 6,
"items": {
"type": "string"
},
"description": "Other MTL versions to rank by score"
},
"voices": {
"type": "array",
"maxItems": 16,
"items": {
"type": "integer",
"minimum": 1,
"maximum": 99
},
"description": "List these instruments' settings"
},
"intent": {
"type": "object",
"description": "Deliberate choices, not scored",
"properties": {
"fixed": {
"type": "array",
"items": {
"type": "string",
"enum": [
"tempo",
"swing",
"meter",
"length",
"form",
"loop"
]
}
},
"loop": {
"type": "boolean"
},
"unpitched": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1
},
"description": "Drum tracks"
},
"melody": {
"type": "integer",
"minimum": 1,
"description": "Melody track, if not the highest"
},
"keep": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Kept on purpose, with a reason: flag codes {\"POLY.CUT\": \"mono arp\"} (\"POLY.CUT:3\" one track) or score codes (REPEAT, LEN...), not deducted"
}
},
"additionalProperties": false
},
"plan": {
"type": "object",
"additionalProperties": true,
"description": "Alone: {bpm, meter, key, peak, sections:[{id, bars, energy 1-5, role}], mix?} gives a skeleton, timing, checks"
},
"skip_plan": {
"type": "string",
"description": "Reason to skip research and plan for a full song (else they come first)"
},
"layers": {
"type": "object",
"description": "With mtl or ref: batch edits {add:[\"A: 3 i3 v40: C4 . . .\"], replace, remove:[\"A:3\"], instruments, mix, notes, order}; returns the edited song",
"properties": {
"notes": {
"type": "array",
"description": "Polyphony: [{ch, ins, section?, notes:[[pitch, startBeat, beats, vel]]}]; placed on sub-channels; vel 0-64 as vNN",
"items": {
"type": "object",
"properties": {
"ch": {
"type": "integer"
},
"ins": {
"type": [
"integer",
"string"
]
},
"section": {
"type": "string"
},
"notes": {
"type": "array",
"items": {}
}
},
"required": [
"ch",
"ins",
"notes"
],
"additionalProperties": false
}
},
"add": {
"type": "array",
"items": {
"type": "string"
}
},
"replace": {
"type": "array",
"items": {
"type": "string"
}
},
"remove": {
"type": "array",
"items": {
"type": "string"
}
},
"instruments": {
"type": "array",
"items": {
"type": "string"
}
},
"mix": {
"type": "object",
"description": "dB; \"-inf\" silences, 0 resets. Faders balance (first choice), gain sets one sound, level is overall loudness",
"properties": {
"faders": {
"type": "object",
"propertyNames": {
"pattern": "^([1-9]|1[0-6])$"
},
"additionalProperties": {
"anyOf": [
{
"type": "number",
"minimum": -60,
"maximum": 6
},
{
"type": "string",
"enum": [
"-inf",
"off"
]
}
],
"default": 0
},
"description": "{\"2\": -6}"
},
"gain": {
"type": "object",
"propertyNames": {
"pattern": "^i?\\d{1,2}$"
},
"additionalProperties": {
"anyOf": [
{
"type": "number",
"minimum": -60,
"maximum": 12
},
{
"type": "string",
"enum": [
"-inf",
"off"
]
}
],
"default": 0
},
"description": "{\"i3\": -3}"
},
"level": {
"anyOf": [
{
"type": "number",
"minimum": -60,
"maximum": 6
},
{
"type": "string",
"enum": [
"-inf",
"off"
]
}
],
"default": 0
}
},
"additionalProperties": false
},
"order": {
"type": "string",
"description": "The song's order line, e.g. \"A B C D C D\" (| marks the loop start)"
}
},
"additionalProperties": false
},
"energy": {
"type": "array",
"items": {
"type": "number"
},
"description": "Planned 1-5 per order entry, for check:true"
}
},
"additionalProperties": false,
"description": "Schema ff675289"
}