Structural Change Code Online
As a supplement to my ISMIR paper, I now opened up the Structural Change code in a Last.fm github repository. Thanks to Last.fm for letting me do this.
As anyone reading the paper may have spotted, it’s a relatively simple concept, and also similar to previous work by Sapp, Streicher and Foote. But I believe that using the change vectors at different time scales as feature vectors could result in genuinely new uses for existing audio features.
My colleague Marcus has helped me make the code much more beautiful than it was only a week ago (thanks). It consists of two C++ (.hpp) files (one of which you don’t need if you’re not working with Vamp plugins).
But let’s assume that you actually have a Vamp plugin with a vector valued output handy. Then you only need to include the two files at the top of your vamp implementation, like so:
#include "StructuralChange.hpp"
#include "VampFeaturesAccess.hpp"
assuming that the files are somewhere in your include path. Then, once your original feature is safely calculated, make a Structural Change output from your usual output like this:
fm::last::audio::StructuralChange sc(12);
fm::last::audio::EuclideanDivergencePolicy edp;
sc.calculate(output_feature_set[structural_change_index], output_feature_set[original_feature_index], edp);
That’s it. (Well, to be honest, you also need to define the Structural Change output in getOutPutDescriptors, but you know that if you know how to make a Vamp plugin.) I hope to be able to make some tests and more detailed example code soon. But definitely not before ISMIR!









