Skip to main content

Changelog 2021-05-06

Laurin Quast

Laurin Quast

Engineer

New instrument, bpm, key and time signature classifiers, new improved similarity search endpoint, deprecation of the FastMusicalAnalysis and FullScaleMusicalAnalysis.

New Instrument Classifiers#

We are proud to announce that we now additionally to our percussion classifier expose the synth, piano, acousticGuitar, electricGuitar, strings, bass, bassGuitar and brassWoodwinds classifiers.

The classifier data for each track segment can be retrieved via the AudioAnalysisV6Segments.instruments field of the type AudioAnalysisV6InstrumentsSegments, which has fields for all the new classifiers.

We also deprecated the AudioAnalysisV6Result.instruments field.

Instead we encourage using the new AudioAnalysisV6Result.instrumentPresence field. The field returns a AudioAnalysisV6InstrumentPresence type that describes the presence of each instrument via the AudioAnalysisV6InstrumentPresenceLabel taxonomy of absent, throughout, frequently and partially. This taxanomy is more meaningful than the deprecated mean float values for the whole track.

The new field AudioAnalysisV6Result.instrumentTags exposes a list of detected instruments throughout the track.

A practical example for DJ Fresh - 'Gold Dust'.

GraphQL Operation

query LibraryTrackInstrumentClassifier($libraryTrackId: ID!) {
libraryTrack(id: $libraryTrackId) {
__typename
... on LibraryTrack {
id
audioAnalysisV6 {
__typename
... on AudioAnalysisV6Finished {
result {
instrumentTags
instrumentPresence {
percussion
synth
piano
acousticGuitar
electricGuitar
strings
bass
bassGuitar
brassWoodwinds
}
}
}
}
}
}
}

Operation Result

{
"data": {
"libraryTrack": {
"__typename": "LibraryTrack",
"id": "1313422",
"audioAnalysisV6": {
"__typename": "AudioAnalysisV6Finished",
"result": {
"instrumentTags": ["percussion", "synth", "bass", "bassGuitar"],
"instrumentPresence": {
"percussion": "frequently",
"synth": "frequently",
"piano": "absent",
"acousticGuitar": "absent",
"electricGuitar": "absent",
"strings": "absent",
"bass": "throughout",
"bassGuitar": "partially",
"brassWoodwinds": "absent"
}
}
}
}
}
}

All these new fields are available for any AudioAnalysisV6 immediately, without having to reanalyze the track.

More information on the AudioAnalysisV6 Classifier Overview

New Key and BPM classifier#

caution

The FullScaleMusicalAnalysis and FastMusicalAnalysis types are now deprecated and will be removed from the API on 15 June 2021. Please use AudioAnalysisV6Result.key and AudioAnalysisV6Result.bpm instead. The corresponding Webhook events will also stopped being delivered on that day. Please contact us if you can not migrate until 15 June 2021, so we can find a solution together.

The new AudioAnalysisV6Result.key and AudioAnalysisV6Result.bpm expose improved key and bpm values over the now deprecated FullScaleMusicalAnalysis and FastMusicalAnalysis.

All these new fields are available for any AudioAnalysisV6 immediately, without having to reanalyze the track.

GraphQL Operation

query LibraryTrackInstrumentClassifier($libraryTrackId: ID!) {
libraryTrack(id: $libraryTrackId) {
__typename
... on LibraryTrack {
id
audioAnalysisV6 {
__typename
... on AudioAnalysisV6Finished {
result {
bpm
key
}
}
}
}
}
}

Operation Result

{
"data": {
"libraryTrack": {
"__typename": "LibraryTrack",
"id": "1313422",
"audioAnalysisV6": {
"__typename": "AudioAnalysisV6Finished",
"result": {
"bpm": 177,
"key": "cMajor"
}
}
}
}
}

More information on the AudioAnalysisV6 Classifier Overview

New Time Signature Classifier#

The AudioAnalysisV6Result.timeSignature now exposes the time signature of the track (e.g. 3/4 or 4/4) as a string.

The field is available for any AudioAnalysisV6 immediately, without having to reanalyze the track.

GraphQL Operation

query LibraryTrackInstrumentClassifier($libraryTrackId: ID!) {
libraryTrack(id: $libraryTrackId) {
__typename
... on LibraryTrack {
id
audioAnalysisV6 {
__typename
... on AudioAnalysisV6Finished {
result {
timeSignature
}
}
}
}
}
}

Operation Result

{
"data": {
"libraryTrack": {
"__typename": "LibraryTrack",
"id": "1313422",
"audioAnalysisV6": {
"__typename": "AudioAnalysisV6Finished",
"result": {
"timeSignature": "4/4"
}
}
}
}
}

More information on the AudioAnalysisV6 Classifier Overview

New Improved Similarity Search#

We improved the performance of our similarity search based on audio features. In addition to that, we exposed a new single field that allows searching similar tracks for both library and Spotify tracks with additional filters for bpm, key, and genre.

Example Query Operation

query TrackSimilarTracksQuery($trackId: ID!) {
libraryTrack(id: $trackId) {
__typename
... on Error {
message
}
... on Track {
id
similarTracks(target: { library: {} }) {
__typename
... on SimilarTracksError {
code
message
}
... on SimilarTracksConnection {
edges {
node {
id
}
}
}
}
}
}

The Track.similarTracks field should now be used for both finding similar Spotify and library tracks.

Learn more about the new similarity search.