Skip to content

Commit

Permalink
Music Token Metadata CIP
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewWestberg committed Aug 4, 2022
1 parent bc16d56 commit 436dde9
Show file tree
Hide file tree
Showing 2 changed files with 248 additions and 0 deletions.
134 changes: 134 additions & 0 deletions CIP-0060/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
CIP: 60
Title: Music Token Metadata
Authors: Andrew Westberg <[email protected]>, Ryan Jones <[email protected]>, Justin Morgan <[email protected]>, Ian Singer <[email protected]>, Anthony Eizmendiz <[email protected]>, Session Cruz <[email protected]>, Jimmy Londo <[email protected]>, Gudbrand Tokerud <[email protected]>, Kevin St.Clair <[email protected]>
Comments-URI: no comments yet
Status: Draft
Type: Informational
Created: 2022-07-26
License: CC-BY-4.0
---

# Abstract

This proposal defines an extension to CIP-25 for token metadata specific to music tokens.

# Motivation

Music tokens on Cardano can be either NFTs or FTs and contain links to audio files. In order for players, indexers, and wallets to be able to properly search and categorize a user's music collection, we need to define a common schema for creating music on Cardano. If all parties creating these music tokens follow similar patterns, apps can consume this information and make proper use of it. The existing CIP-25 is a good base to build upon, but for a good music experience, we need to standardize additional fields that will be required specifically for music tokens.

# Specification

This CIP divides the additional metadata parameters into two categories of `Required` and `Optional`. When minting a music token on Cardano, you are expected to include ALL of the required fields. If you choose to include one or more of the optional fields, they must be named exactly as defined in this CIP. This will properly allow indexing apps and music players to utilize as much of your token metadata as possible without issues. If minting a release

[CDDL Spec Version 1](cddl/version-1.cddl)

## Required Fields ###
| Field | Type | Example(s) | Notes |
| -------- | -------- | -------- | -------- |
| artists | Array\<Artist\> | "artists": [<br/> { "name": "Stevie Nicks" },<br/>{ "name": "Tom Petty" }<br/>] | |
| album_title| String | "album_title": "Mr. Bad Guy" | |
| track_number | Integer | "track_number": 1 | |
| song_title | String \| Array<\String\> | "song_title": "Let's Turn it On" | |
| song_duration | String | "song_duration": "PT3M21S" | ISO8601 Duration Format |
| genres | Array\<String\> | "genres": ["Rock","Classic Rock"] | Limited to 3 genres total. Players should ignore extra genres. |
| copyright | String | "copyright": "℗ 1985 Sony Records" | |
| release_type | Enum\<String\> | "release_type": "Single" | Must be one of "Single" or "Multiple". Multiple includes anything that will have multiple tracks: Album, EP, Compilation, etc...|
| music_metadata_version | Integer | "music_metadata_version" : 1 | Players should look for the presence of this field to determine if the token is a Music Token |

### Optional Fields ###
| Field | Type | Example(s) | Notes |
| -------- | -------- | -------- | -------- |
| contributing_artists | Array\<Artist\> | "contributing_artists": ["Dolly Parton"]<br/>*or*<br/>"contributing_artists": [<br/>"Brad Paisley",<br/>"Keith Urban"<br/>] | |
| series | todo | todo | |
| set | todo | todo | |
| collection | todo | todo | |
| mood | String | "mood": "Empowered" | |
| lyrics | URL | "lyrics": "ipfs://QmSmadTEhB9bJQ1WHq58yN1YZaJo4jv5BwVNGaePvEj4Fy"<br/>*or*<br/>"Lyrics": "https://website.com/song_lyrics.txt" | |
| lyricists | Array\<String\> | "lyricists": ["Paul McCartney", "John Lennon"] | |
| special_thanks | Array\<String\> | "special_thanks": ["Your mom","Your grandma"] | |
| visual_artist | String | "visual_artist": "beeple" | |
| distributor | String | "distributor": "https://newm.io" | |
| release_date | String | "release_date": "2022-07-27" | ISO8601 Date Format |
| publication_date | String | "publication_date": "2022-07-27" | ISO8601 Date Format |
| catalog_number | Integer | "catalog_number": 2 | |
| bitrate | String | "bitrate": "256 kbit/s" | |
| mix_engineer | String | "mix_engineer": "Robert Smith II" | |
| mastering_engineer | String | "mastering_engineer": "Michael Tyson" | |
| producer | String | "producer": "Simon Cowell" | |
| co_producer | String | "co_producer": "Shavaun Dempsey" | |
| featured_artist | Artist | "featured_artist": {"name": "The Temptations"} | |
| recording_engineer | String | "recording_engineer": "Sharon Liston" | |
| release_version | Integer | "release_version": 2 | |
| parental_advisory | String | "parental_advisory": "Explicit" | Explicit/Censored/Non-Explicit
| explicit | Boolean | "explicit": true | |
| isrc | String | "isrc": "US-SKG-22-12345" | |
| metadata_language | String | "metadata_language": "en-US" | https://tools.ietf.org/search/bcp47 |
| country_of_origin | String | "country_of_origin": "United States" | |
| language | String | "language": "en-US" | https://tools.ietf.org/search/bcp47 |
| derived_from | String | "derived_from" : "Some other work" | |
| links | Map\<String,String\> | "links" : {<br/>"website": "https://website.com",<br/>"twitter": "https://twitter.com/username",<br/>"discord_invite": "https://discord.gg/TEzXxjsN",<br/>"TikTok": "https://www.tiktok.com/@knucklebumpfarms",<br/>"discord_username": "MusicianPerson#8537",<br/>"instagram":"...",<br/>"facebook":"...",<br/>"soundcloud": "...",<br/>"bandcamp": "...",<br/>"spotify": "...",<br/>"apple_music": "...",<br/>...<br/>...<br/>} | |

## Examples ##

### Single ###
```
{
"721":
{
"123da5e4ef337161779c6729d2acd765f7a33a833b2a21a063ef65a5":
{
"SickCity354":
{
"name": "SickCity354-Phil z'viel",
"image": "ipfs://QmQ13Cv9Wouf4rcwtNsuFhEeJVK9bEYjCYo6AN986takiu",
"music_metadata_version": 1,
"release_type": "Single",
"album_title": "C.H.I.L.L.",
"song_title": "C.H.I.L.L.",
"song_duration": "PT3M6S",
"track_number": 1,
"mood": "chillout",
"artists":
[
{ "name": "Phil z'viel" }
],
"collection": "C.H.I.L.L.",
"genres":
[
"Guitar Live Looping",
"Progressive Ambient"
],
"copyright": "℗ 2022 Phil z'viel",
"distributor": "https://sickcity.xyz",
"files":
[
{
"name": "C.H.I.L.L.",
"mediaType": "audio/mp3",
"src": "ipfs://QmfY4ugNdYYJxpbn5BnN8yt5EmiUCznexQoQi6RTEu9SuC"
}
],
"links":
{
"discord_user": "Phil z'viel#4711",
"twitter": "@Phil_zviel_CNFT",
"website": "www.philzvielcnft.com"
}
}
}
}
}
```

### Album ###

TODO

# Rationale

Implementing this simplifies and commonizes the process for creating music tokens on Cardano. It greatly simplifies the work that apps have to make when consuming such tokens.

# Copyright

This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode)
114 changes: 114 additions & 0 deletions CIP-0060/cddl/version-1.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
string = text .size (0..64)

policy_id = string / bytes ; hex string for CIP-25 version 1, bytes version 2
asset_name = string / bytes ; utf-8 for CIP-25 version 1, bytes for version 2

artist_details =
{
name : string, ; artist or band name
? image : string / [* string], ; optional image of the artist
}

files_details =
{
name : string,
mediaType : string,
src : string / [* string],

; For Single, these values are defined at the top level. For Multiple, define them for each track.
? artists : [* artist_details],
? album_title : string,
? track_number: uint,
? song_title: string / [* string],
? song_duration: string .regexp "^P(?!$)(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)$", ; iso8601 duration
? genres: [1*3 string],
? copyright: string,

; For Single, these values are defined at the top level. For Multiple, optionally define them for each track
? contributing_artists : [* artist_details],
? series: string,
? set: string,
? collection: string,
? mood: string,
? lyrics: string,
? lyricists: [* string],
? special_thanks: [* string],
? visual_artist: string,
? distributor: string,
? release_date: string,
? publication_date: string,
? catalog_number: uint,
? bitrate: string,
? mix_engineer: string,
? mastering_engineer: string,
? producer: string,
? co_producer: string,
? featured_artist: artist_details,
? recording_engineer: string,
? release_version: uint,
? parental_advisory: string,
? explicit: bool,
? isrc: string,
? metadata_language: string,
? country_of_origin: string,
? language: string,
? derived_from: string,
? links: { * string => string / [* string] },
}

metadata_details =
{
name : string,
image : string / [* string],
music_metadata_version: 1,
release_type: "Single" / "Multiple",

; Fields that are required if this is a "Single". They are omitted for "Multiple" and should be defined under file_details instead.
? artists : [* artist_details],
? album_title : string,
? track_number: uint,
? song_title: string / [* string],
? song_duration: string .regexp "^P(?!$)(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)$", ; iso8601 duration
? genres: [1*3 string],
? copyright: string,

; Fields that are optional for "Single". They are omitted for "Multiple" and may be defined under file_details instead.
? contributing_artists : [* artist_details],
? series: string,
? set: string,
? collection: string,
? mood: string,
? lyrics: string,
? lyricists: [* string],
? special_thanks: [* string],
? visual_artist: string,
? distributor: string,
? release_date: string,
? publication_date: string,
? catalog_number: uint,
? bitrate: string,
? mix_engineer: string,
? mastering_engineer: string,
? producer: string,
? co_producer: string,
? featured_artist: artist_details,
? recording_engineer: string,
? release_version: uint,
? parental_advisory: string,
? explicit: bool,
? isrc: string,
? metadata_language: string,
? country_of_origin: string,
? language: string,
? derived_from: string,
? links: { * string => string / [* string] },

files : [* files_details], ; was optional in CIP-25, required by CIP-60
? version: 1 / 2, ; CIP-25 version
? mediaType : string, ; mediaType for the image. audio goes under files.
? description : string / [* string],
}

label_metadata = { * policy_id => { * asset_name => metadata_details } }

metadata = { 721 : uint => label_metadata }

0 comments on commit 436dde9

Please sign in to comment.