Skip to content

Instantly share code, notes, and snippets.

View dbogdanov's full-sized avatar

Dmitry Bogdanov dbogdanov

View GitHub Profile
@dbogdanov
dbogdanov / INSTALL_windows.md
Created July 3, 2018 17:44
Building Python extension on Windows

Building Essentia's Python extension on Windows

Python.org Windows binaries are compiled against an MS Visual C++ (MSVC) runtime, which version differs with different Python versions. Essentia's Python extension should be built with MSVC too because the MinGW C++ library builds won't be compatible with MSVC.

In this guide we use VirtualBox Windows machine.

Preparing build environment

@dbogdanov
dbogdanov / smc_tasks_acousticbrainz.md
Last active December 24, 2018 10:08
AMP Lab task 2017.01

Task 1: correlation between descriptors and music categories

You are given a dataset of descriptors for music recordings and additional annotations by genres and moods.

  • Analyze global correlations (across all music recordings in the dataset)
    • between descriptors within Group 1
    • between descriptors within Group 2
  • Analyze a correlation of descriptors in Group 1 and Group 2 with
    • music genres associated with the recordings
  • music moods (mood_happy, mood_sad, mood_agressive, mood_relaxed, mood_party)
@dbogdanov
dbogdanov / example.json
Created January 19, 2017 15:06
Example of output of Essentia Music Extractor 2.0 (version in development)
{
"lowlevel": {
"average_loudness": 0.982675015926,
"barkbands_crest": {
"dmean": 3.16559839249,
"dmean2": 5.15330886841,
"dvar": 8.76487731934,
"dvar2": 19.6714382172,
"max": 24.5472221375,
"mean": 11.2651510239,
@dbogdanov
dbogdanov / smc_tasks_essentia.md
Last active January 29, 2018 23:21
SCM tasks 2017.01 (Essentia)

Task 1: Emotion regression

Description

Train and evaluate two Support Vector Regression models for prediction of arousal and valence. Use Essentia's MusicExtractor to compute summarized descriptor values (no frames). Use Scikit-learn for Support Vector Regression. It will be useful to pre-process all features first, standardizing them to zero mean and unit variance.

Write a report in form of a python notebook. This script should:

  • Analyze all audio in the dataset using MusicExtractor and store aggredated analysis results in json files
  • Load descriptors computed for all files, and load arousal/valence annotations
  • Use lowlevel.*, rhythm.*, and tonal.* descriptors
@dbogdanov
dbogdanov / essentia_algorithms_reg.cpp
Created December 11, 2015 15:40
essentia_algorithms_reg.cpp
#include "algorithmfactory.h"
#include "algorithms/rhythm/rhythmextractor2013.h"
#include "algorithms/extractor/rhythmdescriptors.h"
#include "algorithms/tonal/vibrato.h"
#include "algorithms/standard/stereodemuxer.h"
#include "algorithms/tonal/pitchcontoursmonomelody.h"
#include "algorithms/io/audiowriter.h"
#include "algorithms/sfx/maxtototal.h"
#include "algorithms/tonal/harmonicpeaks.h"
#include "algorithms/spectral/maxmagfreq.h"
@dbogdanov
dbogdanov / PitchYin_vs_PitchYinFFT_stationary_signal_test.py
Created March 12, 2015 18:36
evaluation of Essentia's PitchYin and PitchYinFFT on a stationary signal
import numpy as np
import essentia.standard
import matplotlib.pyplot as plt
def sinewave(f0, nseconds, samplerate=44100):
t = np.arange(1, samplerate * nseconds)
sig = np.zeros_like(t)
return sig + 0.5 * np.sin(2 * np.pi * f0 * t / samplerate)