Key Detection In Musical Signals Philip Brown, ’07 Advisor: Dr. Shane Cotter.

Slides:



Advertisements
Similar presentations
The Discrete Fourier Transform. The spectrum of a sampled function is given by where –  or 0 .
Advertisements

Image Enhancement in the Frequency Domain (2)
Aimé Lay-Ekuakille University of Salento. Index: 1.Problem statement 2.Main motivation 3.FDM-Filter Diagonalization Method (mono) 4.DSD-Decimate Signal.
ACHIZITIA IN TIMP REAL A SEMNALELOR. Three frames of a sampled time domain signal. The Fast Fourier Transform (FFT) is the heart of the real-time spectrum.
1 Acoustic Sampling Of Instruments Dan Starr Capstone Design Project Advisors: Prof. Catravas Prof. Postow.
0 - 1 © 2010 Texas Instruments Inc Practical Audio Experiments using the TMS320C5505 USB Stick “Sine Waves” Texas Instruments University Programme Teaching.
Sampling theory Fourier theory made easy
1 Chapter 16 Fourier Analysis with MATLAB Fourier analysis is the process of representing a function in terms of sinusoidal components. It is widely employed.
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
The evaluation and optimisation of multiresolution FFT Parameters For use in automatic music transcription algorithms.
Math Review with Matlab:
ALG0183 Algorithms & Data Structures Lecture 3 Algorithm Analysis 8/25/20091 ALG0183 Algorithms & Data Structures by Dr Andy Brooks Weiss Chapter 5 Sahni.
Let’s go back to this problem: We take N samples of a sinusoid (or a complex exponential) and we want to estimate its amplitude and frequency by the FFT.
PITCH DETECTION Shaan Patel HoangMinh Nguyen Richard King.
Auto-tuning for Electric Guitars using Digital Signal Processing Pat Hurney, 4ECE 31 st March 2009.
Digital Signal Processing
IT-101 Section 001 Lecture #8 Introduction to Information Technology.
Techniques in Signal and Data Processing CSC 508 Fourier Analysis.
Content-Based Classification, Search & Retrieval of Audio Erling Wold, Thom Blum, Douglas Keislar, James Wheaton Presented By: Adelle C. Knight.
Top Level System Block Diagram BSS Block Diagram Abstract In today's expanding business environment, conference call technology has become an integral.
Chapter 2 Fundamentals of Data and Signals
Fig. 2 – Test results Personal Memory Assistant Facial Recognition System The facial identification system is divided into the following two components:
Fourier theory made easy (?). 5*sin (2  4t) Amplitude = 5 Frequency = 4 Hz seconds A sine wave.
Chapter 2: Fundamentals of Data and Signals. 2 Objectives After reading this chapter, you should be able to: Distinguish between data and signals, and.
Programming Logic and Design Fourth Edition, Comprehensive
Discrete Fourier Transform(2) Prof. Siripong Potisuk.
Real-Time Speech Recognition Thang Pham Advisor: Shane Cotter.
1 Chapter 2 Fundamentals of Data and Signals Data Communications and Computer Networks: A Business User’s Approach.
Lecture 12: Introduction to Discrete Fourier Transform Sections 2.2.3, 2.3.
Modulation of Waves (FM Radio, AM Radio and Television)
OBJECTIVES: 1. DETERMINE WHETHER A GRAPH REPRESENTS A FUNCTION. 2. ANALYZE GRAPHS TO DETERMINE DOMAIN AND RANGE, LOCAL MAXIMA AND MINIMA, INFLECTION POINTS,
Inputs to Signal Generation.vi: -Initial Distance (m) -Velocity (m/s) -Chirp Duration (s) -Sampling Info (Sampling Frequency, Window Size) -Original Signal.
Team may00-04 Fazal Baloch, EE Yew-Kwong Soo, EE Wee-Liat Tay, EE Chris Van Oosbree, CprE Walter Wedan, EE Abstract The purpose of this project is to develop.
0 - 1 © 2010 Texas Instruments Inc Practical Audio Experiments using the TMS320C5505 USB Stick “FIR Filters” Texas Instruments University Programme Teaching.
Fall 2004EE 3563 Digital Systems Design Audio Basics  Analog to Digital Conversion  Sampling Rate  Quantization  Aliasing  Digital to Analog Conversion.
GCT731 Fall 2014 Topics in Music Technology - Music Information Retrieval Overview of MIR Systems Audio and Music Representations (Part 1) 1.
Lecture 1 Signals in the Time and Frequency Domains
Data Communications & Computer Networks, Second Edition1 Chapter 2 Fundamentals of Data and Signals.
Motivation Music as a combination of sounds at different frequencies
Lecture 19 Chapter 13 Images continued. Outline from Chapter Operating on Images.
Preprocessing Ch2, v.5a1 Chapter 2 : Preprocessing of audio signals in time and frequency domain  Time framing  Frequency model  Fourier transform 
Dynamic Range and Dynamic Range Processors
Chapter 10 Strings, Searches, Sorts, and Modifications Midterm Review By Ben Razon AP Computer Science Period 3.
Answer the following questions based on the following figure.
Seismic Reflection Data Processing and Interpretation A Workshop in Cairo 28 Oct. – 9 Nov Cairo University, Egypt Dr. Sherif Mohamed Hanafy Lecturer.
Subtractive Sound Synthesis. Subtractive Synthesis Involves subtracting frequency components from a complex tone to produce a desired sound Why is it.
Quality Assurance How do you know your results are correct? How confident are you?
EE 113D Fall 2008 Patrick Lundquist Ryan Wong
LPC-analysis-VOSIM-resynthesis Combined class December 18 th 2012 Johan & Peter Institute of Sonology Royal Conservatory, The Hague.
Fixed & Floating Number Format Dr. Hugh Blanton ENTC 4337/5337.
Judith C. Brown Journal of the Acoustical Society of America,1991 Jain-De,Lee.
Calibration in the Front End Controls Craig Cahillane LIGO Caltech SURF 2013 Mentors: Alan Weinstein, Jamie Rollins Presentation to Calibration Group 8/21/2013.
Auto-tuning for Electric Guitars using Digital Signal Processing Pat Hurney, 4ECE 22 nd January 2009.
CLIQUE FINDER By Ryan Lange, Thomas Dvornik, Wesley Hamilton, and Bill Hess.
Section – Operations with Matrices No Calculator By the end of this lesson you should be able to: Write a matrix and identify its order Determine.
Development of a Readout Scheme for High Frequency Gravitational Waves Jared Markowitz Mentors: Rick Savage Paul Schwinberg.
Spectral subtraction algorithm and optimize Wanfeng Zou 7/3/2014.
Calibration in the Front End Controls Craig Cahillane Luke Burks LIGO Caltech SURF 2013 Mentors: Alan Weinstein, Jamie Rollins Presentation to Calibration.
Fourier Analysis Patrice Koehl Department of Biological Sciences National University of Singapore
Ch. 2 : Preprocessing of audio signals in time and frequency domain
CS 591 S1 – Computational Audio
MECH 373 Instrumentation and Measurements
MECH 373 Instrumentation and Measurements
Comprehensive Design Review
Figure Hz sine wave to be sampled.
Project 1: Brake System Modelling & Control
Fourier series Periodic functions and signals may be expanded into a series of sine and cosine functions
9.4 Enhancing the SNR of Digitized Signals
Lecture 5A: Operations on the Spectrum
Lec.6:Discrete Fourier Transform and Signal Spectrum
Presentation transcript:

Key Detection In Musical Signals Philip Brown, ’07 Advisor: Dr. Shane Cotter

Goals  Develop a Key Detection Algorithm  Implement Algorithm in Real Time  Create Stand-Alone Device to Perform Desired Calculations

Background  There are twelve musical notes  Each note is a frequency f and all other frequencies of 2f, 4f, 8f … 2^x*f  Keys are groups of musical notes that comprise most of the notes in a piece of music

Key Detection SignalWindow Spectrum Analysis Function Peak Finding Note Identification Data Storage Data Manipulation Data Summation Logic Statements Key Identification

Spectral Analysis  FFT vs. Constant Q  FFT: Spectral Data with uniform Frequency Resolution  Constant Q: Spectral Data with Exponential Frequency Resolution, Frequencies fall on Musical Notes

Problems With FFT 60 Hz Hz150Hz Intended Frequencies: Hz, 92.5 Hz, Hz FFT: 0.2s Window Samples/ second

Constant Q Intended Frequencies: Hz, 92.5 Hz, Hz Constant Q: b = 24 fo = 27.5 fmax = Samples/second 62.5Hz 92.5Hz146.83Hz

Problem!  Lower frequencies take longer amounts of time to calculate  In order to use Constant Q, these frequencies must be cut out  Key Detection Still possible in most cases

Key Detection SignalWindow Spectrum Analysis Function Peak Finding Note Identification Data Storage Data Manipulation Data Summation Logic Statements Key Identification

Peak Finding  Use for loops to find relative maxima of spectral content

Peak Find [frequency, amplitude] = Peakfind(signal,b,fk,minamp) Will find all peaks above minimum amplitude. For signal = constant q of 308.7, 617.4, and Hz sine waves. [frequency,amplitude] = Peakfind(signal,24,fk,minamp) outputs: frequency = [ ] amplitude = [ ] Which corresponds to the peak on the constant q plot.

Key Detection SignalWindow Spectrum Analysis Function Peak Finding Note Identification Data Storage Data Manipulation Data Summation Logic Statements Key Identification

Note Identification  Peak Finder outputs array of frequencies  Sorts through array of musical frequencies and find closest one  Takes amplitude of that note and add it to corresponding note in note matrix: [A Bb B C C# D Eb E F F# G G#]

Note Identification [notestrengths] = noteid(frequency,amplitude) Take previous example Will output: notestrengths = [ ]

Key Detection Music Signal Window Spectrum Analysis Function Peak Finding Note Identification Data Storage Data Manipulation Data Summation Logic Statements Key Identification

Data  Each Note Matrix stored Separately  Every time new matrix is added to data, oldest matrix is deleted  To calculate key, all Note Matrices in data are added  Logic Statements determine key by looking at notes with greatest amplitude

Key Detection Start with output of summation of note strengths: [ ] Set the 5 lowest to 0 [ ] Set the rest to 1 [ ] See if this matches any stored keys YES! Key is A.

Putting It All Together  MATLAB Program Implements All of these processes together to output Key vs. Time

Sample Data Key vs. Time Numbers Correspond to Different Keys Expected Keys: A, Key Change to Dm Keys Approximated: A,D,Dm

Problems  Key isn’t always correct  In some pop pieces, key is arguable  However, incorrect keys are generally 5ths of the expected key (as close as possible)  Some pieces have too many accidentals (notes outside of key)

Successes  Key changes are noticeable  Generally, one can determine the key from the output graph  In most cases, if the entire piece is examined, the findkey will output the correct overall key

Real Time  A 3 minute song takes 10 minutes to output key vs. time  Constant Q is very much like DFT  In order to process Constant Q in real time, need to relate it to FFT (possible future project)

More Accurate Key Approximation  Right now, key approximation takes into account 7 strongest notes, regardless of order  Attempts to account for fewer notes unsuccessful  More complicated logic statements could more accurately calculate key (possible future project)

What’s Next  Transfer code to C  Implement code on TI TMS320C6713 DSP Chipset  Tempo?

Acknowledgements and Questions  Thanks to Prof. Catravas for help on music theory  Any Questions?