Skip to content

Commit 619c531

Browse files
author
Jon Staab
committed
Add audio track NIP
1 parent c7a3572 commit 619c531

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

0a.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
NIP-XX
2+
======
3+
4+
Audio Events
5+
---------------
6+
7+
`draft` `optional`
8+
9+
This NIP defines several new event kinds representing different types of audio track. These events
10+
are _parameterized replaceable_ as defined in [NIP-01](./01.md) and deletable per [NIP-09](09.md).
11+
12+
Unlike a `kind 1` event with audio attached, audio events are intended to be surfaced in an audio-specific context
13+
rather than in a general micro-blogging context.
14+
15+
The following kinds are defined by this NIP:
16+
17+
- `31337` represents a music track
18+
- `31338` represents a podcast episode
19+
20+
The following tags are required:
21+
22+
- `d` is a unique identifier randomly generated by the client.
23+
- `media` is the url of the media. This SHOULD NOT be read, but is required for backwards compatibility reasons.
24+
- `imeta` is as described in [NIP 92](./92.md). Multiple `imeta` tags MAY be included to provide for different
25+
use cases (e.g. streaming vs download).
26+
- `title` is the title of the audio track
27+
- `subject` is the title of the audio track (deprecated, but required for compatibility)
28+
29+
The following tags are optional:
30+
31+
- `i` is an external GUID in the format defined [here](https://github.com/MerryOscar/nips/commit/280eb498e0ac56b8f9356c1b7a88cc8b31579801).
32+
- `c` is the track's value as defined by a given category.
33+
- `website` is an external url to a website related to the track.
34+
- `duration` is the duration of the audio track, in seconds.
35+
- `published_at` is a timestamp representing the track's original publish date.
36+
37+
Note that artists, producers, SHOULD be referred to using both a plaintext `c` tag AND a conventional `p` tag when pubkey is available. When doing so, the `p` tag's petname MUST be the same as the `c` tag's value. In this way `c` tags can be used to indicate genre, as well as artist, producer, etc.
38+
39+
If included, `genre` and `subgenre` SHOULD be based on [this list](https://github.com/wavlake/genre-list).
40+
41+
`content` SHOULD be summary or description of the audio content.
42+
43+
Example:
44+
45+
```json
46+
{
47+
"id": <event_id>,
48+
"pubkey": <author_pubkey>,
49+
"created_at": <created_at>,
50+
"kind": 31337,
51+
"content": "Chill beats",
52+
"tags": [
53+
["d", "<id>"],
54+
["c", "Pop", "genre"],
55+
["c", "EDM", "subgenre"],
56+
["c", "Columbia Records", "record_label"],
57+
["c", "AC/DC", "artist"],
58+
["i", "podcast:item:guid:123", "https://fountain.fm/episode/30uEXC25615Ze2ELjY2p"],
59+
["p", "2a07724d42fd8004b5c97b62ba03b6baf3919f9e8211667039987866997e97ad", "wss://my-relay.com", "AC/DC"],
60+
["title", "Platinum Robots on the Moon"],
61+
["subject", "Platinum Robots on the Moon"],
62+
["published_at", "<published_at>"],
63+
["imeta", "url https://example.com/my-track.m3u8", "x <hash>", ...]
64+
]
65+
}
66+
```

51.md

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ Aside from their main identifier, the `"d"` tag, sets can optionally have a `"ti
5454
| Kind mute sets | 30007 | mute pubkeys by kinds<br>`"d"` tag MUST be the kind string | `"p"` (pubkeys) |
5555
| Interest sets | 30015 | interest topics represented by a bunch of "hashtags" | `"t"` (hashtags) |
5656
| Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) |
57+
| Music Playlist | 30037 | a list of kind `31337` music tracks | `"a"` (kind:31337 music tracks) |
58+
| Podcast Playlist | 30038 | a list of kind `31338` podcast episodes | `"a"` (kind:31338 podcast episodes) |
5759
| Release artifact sets | 30063 | groups of files of a software release | `"e"` (kind:1063 [file metadata](94.md) events), `"i"` (application identifier, typically reverse domain notation), `"version"` |
5860

5961
## Deprecated standard lists

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
3131
- [NIP-07: `window.nostr` capability for web browsers](07.md)
3232
- [NIP-08: Handling Mentions](08.md) --- **unrecommended**: deprecated in favor of [NIP-27](27.md)
3333
- [NIP-09: Event Deletion Request](09.md)
34+
- [NIP-0a: Audio Tracks](0a.md)
3435
- [NIP-10: Conventions for clients' use of `e` and `p` tags in text events](10.md)
3536
- [NIP-11: Relay Information Document](11.md)
3637
- [NIP-13: Proof of Work](13.md)
@@ -189,6 +190,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
189190
| `30618` | Repository state announcements | [34](34.md) |
190191
| `30818` | Wiki article | [54](54.md) |
191192
| `30819` | Redirects | [54](54.md) |
193+
| `31337` | Music Track | [0a](0a.md) |
194+
| `31338` | Podcast Episode | [0a](0a.md) |
192195
| `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] |
193196
| `31922` | Date-Based Calendar Event | [52](52.md) |
194197
| `31923` | Time-Based Calendar Event | [52](52.md) |

0 commit comments

Comments
 (0)