Note that this statement is now deprecated as AcousticBrainz stopped collecting data in 2022. A link to the blog post describing the reasons behind ending the project can be found here. At some point in the future this statement will no longer be supported.
This AcousticBrainz database provides access to audio information on tracks based on their MusicBrainz recording id (Unique file identifier).
The function will only operate on tracks which have a MusicBrainz recording id. All other tracks will be ignored.
You can request that values for BPM and/or Initial Key be imported. Note that BPM values are truncated according to the current BPM settings in Preferences-Audio-Common.
A calculated BPM value's correctness may be affected by tempo estimation octave errors. This can result in a value being double or half what seems to be correct. Unfortunately it is impossible to automatically determine if a downloaded value is correct. The only viable solution is to examine the results and determine if they seem correct or need to be halved or doubled.
AcousticBrainz uses two different algorithms to determine the key. You can import the results of either or both and place the result in the Initial Key field. The key results are based on Temperley’s profile. The chords results are based on the progression of chords in the track. When you import both, the Initial Key field will be set to k/c where k is the key result and c is the chords result. Individual key results are represented as a string with a maximum length of three characters. The ground keys are represented with "A","B","C","D","E", "F" and "G" and halfkeys represented with "b" and "#". Minor is represented as "m", e.g. "Dbm".
AcousticBrainz provides comprehensive classification metadata. If you wish you can save the classification metadata as a key-value list to a variable and/or to the file as a UDTI named AcousticBrainz Data. Keys are separated from values with the default list key-value delimiter (\k). List items are delimited by the default list delimiter (\~). Warning: if you are going to save the classification data to a file, remember that the delimiters are UTF8 characters. ID3 based files will lose data if the Text Encoding is set to ISO-8859-1 and ISO-8859-1 if possible has not been set.
Each list item's value is formatted as follows:
# is a probability specified as a percentage. The % character can be used as a split position if you want to separate the probability from the value-text. eg.
The following keys may be available:
The values returned are for those with the highest probability. If you want to see probabilities for all possible values set the All option. When All is set, additional keys and values will be generated. The additional keys will have the same names as described aboved with _all appended. eg. danceability_all. The values for each of these all items will also be key-value lists. The keys will be the value names and the values will be the probabilities. The default key-value delimiter (\k) is used. The List Secondary Delimiter (\:) is used to separate items.
The following is a sample of a saved classification list with All not set:
The following is a sample of a saved classification list with All set:
The following code snippet would extract the danceability setting, saving the probability to named variable result and the value-text to named variable value. Based on either of the above examples, value will be set to Not Danceable and result will be set to 70:
Set named variable 'result' to the value of case insensitive key 'danceability' in the list in field Variable 0 (delimiter "⏎" separator "≔")
Split named variable 'result' at delimiter "%" save right portion to named variable 'value'
The following code snippet would extract the probability associated with the Danceable sub-key in danceable. Based on the above example which has All set, probability will be set to 30:
Set field Variable 1 to the value of case insensitive key 'danceable_all' in the list in field Variable 0 (delimiter "⏎" separator "≔")
Set named variable 'probability' to the value of case insensitive key 'danceable' in the list in field Variable 1 (delimiter "\:" separator "≔")
You can optionally choose to only import data if the requested fields fields are currently empty.
You can choose to ignore errors, in which case the action will not display error messages. Note that this option is ignored when Batch Processing.
Note that this statement sets the Network Response property.
While this statement can be executed grouped it is far more efficient when executed stepwise. The API allows for the grouping of multiple lookups into a single request.