MUSIC/AUDIO ANALYSIS IN PYTHON. Vivek Jayaram

Similar documents
Lecture 7: Music

AUTOMASHUPPER: AN AUTOMATIC MULTI-SONG MASHUP SYSTEM

PHYSICS OF MUSIC. 1.) Charles Taylor, Exploring Music (Music Library ML3805 T )

Spectrum Analyser Basics

Week 14 Query-by-Humming and Music Fingerprinting. Roger B. Dannenberg Professor of Computer Science, Art and Music Carnegie Mellon University

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

Mathematics and Music

Music Genre Classification

CS 591 S1 Computational Audio

Lecture 1: What we hear when we hear music

CSC475 Music Information Retrieval

ECE438 - Laboratory 4: Sampling and Reconstruction of Continuous-Time Signals

PHY 103: Scales and Musical Temperament. Segev BenZvi Department of Physics and Astronomy University of Rochester

EE-217 Final Project The Hunt for Noise (and All Things Audible)

Music Alignment and Applications. Introduction

Musical Acoustics Lecture 16 Interval, Scales, Tuning and Temperament - I

Pitch-Synchronous Spectrogram: Principles and Applications

Lecture 15: Research at LabROSA

Voice & Music Pattern Extraction: A Review

Homework 2 Key-finding algorithm

Simple Harmonic Motion: What is a Sound Spectrum?

Beethoven s Fifth Sine -phony: the science of harmony and discord

EE391 Special Report (Spring 2005) Automatic Chord Recognition Using A Summary Autocorrelation Function

Book: Fundamentals of Music Processing. Audio Features. Book: Fundamentals of Music Processing. Book: Fundamentals of Music Processing

Musical Acoustics Lecture 15 Pitch & Frequency (Psycho-Acoustics)

Lab 5 Linear Predictive Coding

Please feel free to download the Demo application software from analogarts.com to help you follow this seminar.

Tempo and Beat Analysis

Musical Signal Processing with LabVIEW Introduction to Audio and Musical Signals. By: Ed Doering

The Pythagorean Scale and Just Intonation

Singer Recognition and Modeling Singer Error

Robert Alexandru Dobre, Cristian Negrescu

Data Driven Music Understanding

Music 175: Pitch II. Tamara Smyth, Department of Music, University of California, San Diego (UCSD) June 2, 2015

Rechnergestützte Methoden für die Musikethnologie: Tool time!

Music Representations

LabView Exercises: Part II

Supplemental Material for Gamma-band Synchronization in the Macaque Hippocampus and Memory Formation

Polyphonic Audio Matching for Score Following and Intelligent Audio Editors

Topic 11. Score-Informed Source Separation. (chroma slides adapted from Meinard Mueller)

Melody Extraction from Generic Audio Clips Thaminda Edirisooriya, Hansohl Kim, Connie Zeng

Short-Time Fourier Transform

MUSIC is a ubiquitous and vital part of the lives of billions

Laboratory Assignment 3. Digital Music Synthesis: Beethoven s Fifth Symphony Using MATLAB

The Composer s Materials

Effects of acoustic degradations on cover song recognition

9.35 Sensation And Perception Spring 2009

UNIVERSITY OF DUBLIN TRINITY COLLEGE

Week 14 Music Understanding and Classification

Reference Manual. Using this Reference Manual...2. Edit Mode...2. Changing detailed operator settings...3

The Tone Height of Multiharmonic Sounds. Introduction

A Parametric Autoregressive Model for the Extraction of Electric Network Frequency Fluctuations in Audio Forensic Authentication

A CHROMA-BASED SALIENCE FUNCTION FOR MELODY AND BASS LINE ESTIMATION FROM MUSIC AUDIO SIGNALS

Topic 10. Multi-pitch Analysis

Automatic music transcription

A Parametric Autoregressive Model for the Extraction of Electric Network Frequency Fluctuations in Audio Forensic Authentication

Lecture 5: Frequency Musicians describe sustained, musical tones in terms of three quantities:

ARECENT emerging area of activity within the music information

Math and Music. Cameron Franc

6.5 Percussion scalograms and musical rhythm

LESSON 1 PITCH NOTATION AND INTERVALS

Searching for Similar Phrases in Music Audio

CZT vs FFT: Flexibility vs Speed. Abstract

THE importance of music content analysis for musical

Lecture 9 Source Separation

Augmentation Matrix: A Music System Derived from the Proportions of the Harmonic Series

Pitch. The perceptual correlate of frequency: the perceptual dimension along which sounds can be ordered from low to high.

Getting Started with the LabVIEW Sound and Vibration Toolkit

POST-PROCESSING FIDDLE : A REAL-TIME MULTI-PITCH TRACKING TECHNIQUE USING HARMONIC PARTIAL SUBTRACTION FOR USE WITHIN LIVE PERFORMANCE SYSTEMS

1 Ver.mob Brief guide

hit), and assume that longer incidental sounds (forest noise, water, wind noise) resemble a Gaussian noise distribution.

GYROPHONE RECOGNIZING SPEECH FROM GYROSCOPE SIGNALS. Yan Michalevsky (1), Gabi Nakibly (2) and Dan Boneh (1)

Chord Classification of an Audio Signal using Artificial Neural Network

DAY 1. Intelligent Audio Systems: A review of the foundations and applications of semantic audio analysis and music information retrieval

Supplementary Course Notes: Continuous vs. Discrete (Analog vs. Digital) Representation of Information

Mathematics & Music: Symmetry & Symbiosis

A TEXT RETRIEVAL APPROACH TO CONTENT-BASED AUDIO RETRIEVAL

Music Representations

Linear Time Invariant (LTI) Systems

Topic 4. Single Pitch Detection

The Mathematics of Music and the Statistical Implications of Exposure to Music on High. Achieving Teens. Kelsey Mongeau

Note on Posted Slides. Noise and Music. Noise and Music. Pitch. PHY205H1S Physics of Everyday Life Class 15: Musical Sounds

Shades of Music. Projektarbeit

GRADIENT-BASED MUSICAL FEATURE EXTRACTION BASED ON SCALE-INVARIANT FEATURE TRANSFORM

Pitch Perception and Grouping. HST.723 Neural Coding and Perception of Sound

A Basic Study on the Conversion of Sound into Color Image using both Pitch and Energy

Tempo Estimation and Manipulation

ni.com Digital Signal Processing for Every Application

Digital Signal Processing Detailed Course Outline

Analytic Comparison of Audio Feature Sets using Self-Organising Maps

10:15-11 am Digital signal processing

Musical Hit Detection

Author Index. Absolu, Brandt 165. Montecchio, Nicola 187 Mukherjee, Bhaswati 285 Müllensiefen, Daniel 365. Bay, Mert 93

Music Genre Classification and Variance Comparison on Number of Genres

NanoGiant Oscilloscope/Function-Generator Program. Getting Started

Audio Processing Exercise

ADDING (INJECTING) NOISE TO IMPROVE RESULTS.

Whrat do you get when you cross a rubber band with

Universal Format Converter Implementation

Automatic Rhythmic Notation from Single Voice Audio Sources

Transcription:

MUSIC/AUDIO ANALYSIS IN PYTHON Vivek Jayaram

WHY AUDIO SIGNAL PROCESSING? My background as a DJ and CS student Music is everywhere! So many possibilities Many parallels to computer vision

SOME APPLICATIONS Shazam - How does it recognize songs?

SOME APPLICATIONS Speech to Text Siri, Android

OTHER APPLICATIONS Classify a song into genre Find interesting segments of songs Recommendations Generate Audio Automatically

OVERVIEW Basics of Audio Sampling and Representation Fourier Transformations Building an Auto-DJ Software Finding Interesting Segments of Songs

BASICS OF AUDIO Waves and Frequencies

BASICS OF SOUND Most basic type of sound is a sine wave

BASICS OF SOUND Frequency determines pitch, amplitude determines volume Doubling the frequency creates octave (same note) Nice ratios generally make nice intervals

BASICS OF SOUND Can combine sine waves to make intervals (Perfect Fifth Below)

WHAT MAKES A SOUND DISTINCT? If a piano and guitar playing A are both 440, why do they sound different? Each has different amount of overtones Frequencies at 440hz, 880hz, 1320hz, 1760hz Ratio of each determines timbre

WHAT MAKES A SOUND DISTINCT?

WHAT MAKES A SOUND DISTINCT Add all those sine waves together

HOW IS AUDIO STORED IN COMPUTERS? Sampling and Representation

SAMPLING Sound in the real world is a continuous wave Computers are discrete. Need to sample

SAMPLING Music is just array of heights sampled at regular intervals Music normally sampled at 44khz Space vs quality tradeoff Issues with high frequencies

SAMPLING

FOURIER TRANSFORMS

MOTIVATIONS Array of numbers doesn t tell us much about audio Want a more representative feature Frequency is everything Can we get frequencies?

FOURIER TRANSFORM

FOURIER TRANSFORM

FOURIER TRANSFORMS Decompose any wave into sine frequencies Theory is outside scope Height is amplitude of that frequency

FOURIER TRANSFORMS IN PYTHON FT woks on continuous, infinitely long waves Alternative calculates discrete, short time TF Take small section of audio (.1 sec), calculate frequencies

LIBROSA Don t reinvent the wheel! Can get frequencies in two lines of code y, sr = librosa.load( song.mp3 ) D = librosa.stft(y)

GET MUSICAL PITCHES Frequencies are nice but can we do more? ~440 is an A, so is 880 etc. Bin frequencies at different octaves to get amount of each note Get 12 x num_samples array y, sr = librosa.load( song.mp3 ) S = np.abs(librosa.stft(y)**2) # Get magnitude of stft chroma = librosa.feature.chroma_stft(s=s, sr=sr)

BUILDING AN AUTO-DJ

GOAL Create mix-ins and mix-outs that sound good Manually select mix-in and mix-out point for many songs of equal lengths Try to figure out which songs mash well with each other Create the mix and output result

MASHABILITY BASED ON FREQUENCIES Want to see how well two songs sound while played over each other Compute chromagram for each See how similar they are on a frame by frame basis

RESULT Find best mixes Synchronize beats using librosa Output result using EchoNest for python Code at github.com/vivjay30/autodj/

FINDING INTERESTING PARTS OF SONGS Project with Google

GOAL Wanted 10 second clips for a Guess the Song Game Random selection won t suffice Need those clips to be interesting/recognizable parts of the song Idea: Look for 10s clip that repeats itself the most number of times

CHROMAGRAMS Chromagrams used and worked excellently Robust against changes in instrumentation Chorus in different octave still looks exactly the same Distills piece down to notes

TIME-TIME SIMILARITY MATRIX Chromagram is long array, compare each sample to every other sample Point (x,y) represents how similar time x and y are Example shown for Scream and Shout

FINDING SEGMENTS Repeated segments show up as diagonal lines Look for these diagonal lines and group together to find most repeated segment Unfortunately can t play samples because code belongs to Google

KEY TAKEAWAYS Don t reinvent the wheel. Libraries exist for everything Frequencies are important and are an accurate representation of music Not always important to understand theory to use application