{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A piece of audio with its file on the author's PDS. The basic fields use the names plyr.fm's fm.plyr.track uses, so music apps can read it with little code; note that here `artist` is the performer, not the uploader. Concert recordings add the optional `recording` section.",
      "key": "tid",
      "record": {
        "properties": {
          "album": {
            "description": "The show or album the track belongs to, for example \"Galactic · Moguls · 1997-08-15\".",
            "maxLength": 256,
            "type": "string"
          },
          "artist": {
            "description": "The performer (for example the band), not the account that uploaded it.",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "audioBlob": {
            "accept": [
              "audio/webm",
              "audio/ogg",
              "audio/mpeg",
              "audio/mp4",
              "audio/flac",
              "audio/wav"
            ],
            "description": "The audio file (the Foundry's importer stores Opus in WebM). Servers may hold files to a smaller limit (Bluesky-hosted accounts: 50 MB).",
            "maxSize": 100000000,
            "type": "blob"
          },
          "createdAt": {
            "description": "When the track was added.",
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Liner notes, show notes, setlist or lineage notes.",
            "maxLength": 5000,
            "type": "string"
          },
          "duration": {
            "description": "Duration in seconds.",
            "minimum": 1,
            "type": "integer"
          },
          "fileType": {
            "description": "The audio file's format, for example webm.",
            "maxLength": 16,
            "minLength": 1,
            "type": "string"
          },
          "imageBlob": {
            "accept": [
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/gif"
            ],
            "description": "Cover artwork.",
            "maxSize": 10000000,
            "type": "blob"
          },
          "recording": {
            "ref": "#recording",
            "type": "ref"
          },
          "tags": {
            "description": "The creator's tags.",
            "items": {
              "maxLength": 50,
              "type": "string"
            },
            "maxLength": 20,
            "type": "array"
          },
          "title": {
            "description": "The track's title.",
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "trackNumber": {
            "description": "The track's place in its show or album.",
            "maximum": 999,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "title",
          "audioBlob",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "recording": {
      "description": "Where and how a live recording was made (for example a Live Music Archive show).",
      "properties": {
        "archiveUrl": {
          "description": "The show's page, for example on the Live Music Archive.",
          "format": "uri",
          "maxLength": 2000,
          "type": "string"
        },
        "date": {
          "description": "The performance date: YYYY-MM-DD, YYYY-MM or YYYY.",
          "maxLength": 10,
          "type": "string"
        },
        "place": {
          "description": "City and state or country.",
          "maxLength": 256,
          "type": "string"
        },
        "policyUrl": {
          "description": "The performer's sharing policy.",
          "format": "uri",
          "maxLength": 2000,
          "type": "string"
        },
        "set": {
          "description": "For example Set 1, Set 2, Encore.",
          "maxLength": 64,
          "type": "string"
        },
        "source": {
          "description": "Soundboard or audience, and the lineage (microphones, equipment, transfers).",
          "maxLength": 1000,
          "type": "string"
        },
        "taper": {
          "description": "Who recorded it.",
          "maxLength": 256,
          "type": "string"
        },
        "venue": {
          "maxLength": 256,
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "description": "A piece of audio (a song, a live track, a recording) with its audio file on the author's PDS.",
  "id": "cafe.thunderbird.audio.track",
  "lexicon": 1
}
