How to Register Music on Story
Learn how to properly register music on Story as an IP Asset using the Typescript SDK.
In this tutorial, you will learn how to properly register music as IP on Story using the TypeScript SDK. At the end, you will be able to listen to your song directly on our explorer.
Example Final Result
View an example result after following this tutorial.
Justin Bieber is coming to Story!
“Peaches” by Justin Bieber is one of the first RWAs coming to Story. Check out the announcement!
1. Create a Song
Before we register music on Story, you’ll obviously need some music! If you already have music, make sure you have a link to the music file directly. For example, https://cdn1.suno.ai/dcd3076f-3aa5-400b-ba5d-87d30f27c311.mp3
. If you don’t already have this, you can upload your music file to IPFS:
If you want to create a test song, go to Suno, which is an awesome platform for AI-generated music. We can get a test song by:
- Inputting a prompt to create a song
- Click on the final result, which should take you to a URL like
https://suno.com/song/dcd3076f-3aa5-400b-ba5d-87d30f27c311
- Copy the the
SONG_ID
in the URL (dcd3076f-3aa5-400b-ba5d-87d30f27c311
) - Copy the following URL:
https://cdn1.suno.ai/${SONG_ID}.mp3
, making sure to replaceSONG_ID
with your own.
This is the URL we’ll use in step 2.
2. Complete the “How to Register IP” Tutorial
Most of what we need to do is already covered in Register an IP Asset. Complete that tutorial first, and then come back here.
3. Change Metadata
The only difference is how you set your metadata. Here is an example:
image.*
is used to display a cover image when your song is registeredmedia.*
is used for the audio file. Also note that the fields passed intomedia.*
are checked for infringement by the Story Attestation Service.
After you’ve done that, you can set your NFT metadata like so:
image
for the cover imageanimation_url
is used for the audio fileattributes
for any extra attributes you want to include
4. Done!
When you run the script, you will register an IP Asset and it will look something like this on our explorer.
You can see the explorer recognizes the metadata format, and you can play the song directly on the page!