Music metadata

You can optionally add some music metadata in your Strudel code, by using tags in code comments:

// @title Hey Hoo
// @by Sam Tagada
// @license CC BY-NC-SA

Like other comments, those are ignored by Strudel, but it can be used by other tools to retrieve some information about the music.

It is for instance used by the swatch tool to display pattern titles in the examples page.

Alternative syntax

You can also use comment blocks:

/*
@title Hey Hoo
@by Sam Tagada
@license CC BY-NC-SA
*/

Or define multiple tags in one line:

// @title Hey Hoo @by Sam Tagada @license CC BY-NC-SA

The title tag has an alternative syntax using quotes (must be defined at the very begining):

// "Hey Hoo" @by Sam Tagada

Tags list

Available tags are:

  • @title: music title
  • @by: music author(s), separated by comma, eventually followed with a link in <> (ex: @by John Doe <https://example.com>)
  • @license: music license(s), e.g. CC BY-NC-SA. Unsure? Choose a creative commons license here
  • @details: some additional information about the music
  • @url: web page(s) related to the music (git repo, soundcloud link, etc.)
  • @genre: music genre(s) (pop, jazz, etc)
  • @album: music album name

Multiple values

Some of them accepts several values, using the comma or new line separator, or duplicating the tag:

/*
@by Sam Tagada
    Jimmy
@genre pop, jazz
@url https://example.com
@url https://example.org
*/

You can also add optional prefixes and use tags where you want:

/*
song @by Sam Tagada
samples @by Jimmy
*/
...
note("a3 c#4 e4 a4") // @by Sandy

Multiline

If a tag doesnโ€™t accept a list, it can take multi-line values:

/*
@details I wrote this song in February 19th, 2023.
         It was around midnight and I was lying on
         the sofa in the living room.
*/