๐Working with tags
How to obtain the Muzaic dictionary required for music ordering?
The Muzaic API operates on a tagging mechanism. To retrieve music of a specific type based on mood and/or music genre/style, you should use designated keywords known as 'mood tags.' You can obtain the current list of available tags by making a request to the 'getTags' endpoint.
Getting the list of tags using getTags endpoint
getTags
GET
/getTags
Endpoint allows you to obtain JSON with all the currently accepted mood tags for muzaic system.
Handling tags relations
Some tags are negatively correlated, their meanings are contradictory, and they shouldn't be selected simultaneously. These correlations are described in the tagRelations
field of the response, which is a JSON object of objects. The keys in this object represent tag IDs, and only negative correlations are available, indicated by a value of '-1'.
In the example provided, negative correlations are shown for tag ID '1.' Tags with IDs '2,' '4,' and '16' should be disabled for selection in the frontend app.
Handling parameters bonuses
Each tag comes with a set of system-calculated bonuses that influence music parameters. When handling the selection of tags in a frontend application, these bonuses should be added to (or subtracted from) the parameter representation. When multiple tags are selected, the overall bonus is calculated according to the following rules:
If all parameter bonuses have positive values or are zero, the maximal bonus is used.
If all parameter bonuses have negative values or are zero, the minimal bonus is used.
When there are mixed bonuses (both positive and negative values), an average is calculated and rounded to the nearest integer value.
Good to know: You are not required to calculate the parameters; providing the tags alone is sufficient. Calculate parameters only when your app offers manual music parameter adjustments.
Full response JSON example
Last updated