ELEC484 Phase Vocoder Kelley Fea Overview Analysis Phase Synthesis Phase Transformation Phase  Time Stretching  Pitch Shifting  Robotization  Whisperation.

Slides:



Advertisements
Similar presentations
[1] AN ANALYSIS OF DIGITAL WATERMARKING IN FREQUENCY DOMAIN.
Advertisements

DSPRevision I
Islamic university of Gaza Faculty of engineering Electrical engineering dept. Submitted to: Dr.Hatem Alaidy Submitted by: Ola Hajjaj Tahleel.
Department of Kinesiology and Applied Physiology Spectrum Estimation W. Rose
Introduction to Matlab
Welcome to MATLAB DigComm LAB
Spectral Leakage Pp289 jdsp. Freq of kth sample, No centering.
Wavelets Fast Multiresolution Image Querying Jacobs et.al. SIGGRAPH95.
Image Enhancement in the Frequency Domain (2)
1 3D Vector & Matrix Chapter 2. 2 Vector Definition: Vector is a line segment that has the direction. The length of the line segment is called the magnitude.
UNLOCKING THE SECRETS HIDDEN IN YOUR DATA Part 3 Data Analysis.
Amplitude modulation DSB-LC (full AM)
Lecture 15 Orthogonal Functions Fourier Series. LGA mean daily temperature time series is there a global warming signal?
Easily extensible unix software for spectral analysis, display modification, and synthesis of musical sounds James W. Beauchamp School of Music Dept.
Thursday, October 12, Fourier Transform (and Inverse Fourier Transform) Last Class How to do Fourier Analysis (IDL, MATLAB) What is FFT?? What about.
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.
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
What is Sound? Sound is the movement of energy through substances in longitudinal (compression/rarefaction) waves. Sound is produced when a force causes.
Time-scale and pitch modification Algorithms review Alexey Lukin.
Techniques in Signal and Data Processing CSC 508 Fourier Analysis.
Elec 484 Final Project: Phase Vocoder Matt Pierce.
Gerald Leung.  Implementation Goal of Phase Vocoder  Spectral Analysis and Manipulation  Matlab Implementation  Result Discussion and Conclusion.
Phase Vocoder Colter McQuay Phase Vocoder Structure Input x[nTs] Effect Specific Code Synthesize Output y[nTs] Analyze.
1 Audio Compression Techniques MUMT 611, January 2005 Assignment 2 Paul Kolesnik.
FFT-based filtering and the Short-Time Fourier Transform (STFT) R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.
Fourier: ApplicationsModern Seismology – Data processing and inversion 1 Fourier Transform: Applications Seismograms Eigenmodes of the Earth Time derivatives.
Transient and steady state response (cont.)
Effects in frequency domain Stefania Serafin Music Informatics Fall 2004.
Key Detection In Musical Signals Philip Brown, ’07 Advisor: Dr. Shane Cotter.
Digital Image Processing Final Project Compression Using DFT, DCT, Hadamard and SVD Transforms Zvi Devir and Assaf Eden.
Intensity effects in the longitudinal plane A. Lasheen, D. Quartullo 23rd HEADTAIL Development meeting – 25/07/14 1.
Goals For This Class Quickly review of the main results from last class Convolution and Cross-correlation Discrete Fourier Analysis: Important Considerations.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Lecture 1 Signals in the Time and Frequency Domains
AM modulation essentially consists of the TD multiplication of the modulating signal by a cosine carrier. In the FD, AM modulation effected a frequency.
Image Synthesis Rabie A. Ramadan, PhD 3. 2 Our Problem.
Chapter 16 Speech Synthesis Algorithms 16.1 Synthesis based on LPC 16.2 Synthesis based on formants 16.3 Synthesis based on homomorphic processing 16.4.
Implementing a Speech Recognition System on a GPU using CUDA
Recap Script M-file Editor/Debugger Window Cell Mode Chapter 3 “Built in MATLAB Function” Using Built-in Functions Using the HELP Feature Window HELP.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Chapter 8 The Discrete Fourier Transform Zhongguo Liu Biomedical Engineering School of Control.
EE 113D Fall 2008 Patrick Lundquist Ryan Wong
ECE 5525 Osama Saraireh Fall 2005 Dr. Veton Kepuska
P. N. Kulkarni, P. C. Pandey, and D. S. Jangamashetti / DSP 2009, Santorini, 5-7 July DSP 2009 (Santorini, Greece. 5-7 July 2009), Session: S4P,
4.5 Inverse of a Square Matrix
By Dr. Rajeev Srivastava CSE, IIT(BHU)
Time Compression/Expansion Independent of Pitch. Listening Dies Irae from Requiem, by Michel Chion (1973)
Overview of Previous Lesson(s) Over View VP is the methodology in which development allows the user to grab and use the desired tools like menus, buttons,
1 CS 177 Week 7 Recitation Slides Modifying Sounds using Loops + Discussion of some Exam Questions.
Phase Vocoder Marlon Smith. Split into amplitude and phase %do the windowing, stored in seperate %sections for FFT for m=0:1:(loopsentinel-(win/Ra)) for.
Fourier transform.
Lecture 19 Spectrogram: Spectral Analysis via DFT & DTFT
Chapter 12 Design via State Space <<<4.1>>>
Time-Frequency Spectrum
CS 591 S1 – Computational Audio
Spectrum Analysis and Processing
Voice Manipulator Department of Electrical & Computer Engineering
Time Response Analysis
III Digital Audio III.9 (Wed Oct 25) Phase vocoder for tempo and pitch changes.
FFT-based filtering and the
Plans for stochastic hardware injection
Interpolation and Pulse Compression
Lab 6 Part II Instructions
CSCE 643 Computer Vision: Thinking in Frequency
III Digital Audio III.9 (Wed Oct 24) Phase vocoder for tempo and pitch changes.
Chapter 8 The Discrete Fourier Transform
Chapter 8 The Discrete Fourier Transform
Govt. Polytechnic Dhangar(Fatehabad)
Chapter 8 The Discrete Fourier Transform
ENEE222 Elements of Discrete Signal Analysis Lab 9 1.
Presentation transcript:

ELEC484 Phase Vocoder Kelley Fea

Overview Analysis Phase Synthesis Phase Transformation Phase  Time Stretching  Pitch Shifting  Robotization  Whisperation  To Do Denoising Stable/Transient Components Separation

Analysis Phase

Based on Bernardini’s document  pv_analyze.m Inputs: inx, w, Ra Uses hanningz.m to create window Modulates signal with window Performs FFT and fftshift Outputs: Mod_y, Ph_y  (Moduli and Phase)

pv_analyze.m function [Mod_y, Ph_y] = pv_analyze(inx, w, Ra) % pv_analyze.m for ELEC484 Project Phase 1 % Analysis phase... based on Bernardini % inx = original signal % w = desired window size % Ra = analysis hop size % Get size of inx; store rows and columns separately [xrow, xcolumn] = size(inx); % Create Hanning window % using the hanningz code found in Bernardini win = hanningz(w);

pv_analyze.m % Figure out the number of windows required num_win = ceil( (xrow - w + Ra) / Ra ); % Matrix for storing time slices (ts) ts = zeros(w, num_win); % Modulation of the signal with the window happens here count = 1; for i = 0:num_win % the frame ends... frame_end = w - 1;

pv_analyze.m % checks to see where the end of the frame should be % if the count + frame_end goes outside of the size limitations do... if ( count + frame_end >= size(inx,1)) frame_end = size(inx,1) - count; end % determine where the end of the window is win_end = frame_end+1; % Set value of the time slice to match the windowed segment ts = inx( count : count + frame_end ).* win( 1 : win_end );

pv_analyze.m % FFT value of ts using fftshift which moves zero frequency component Y( 1 : win_end,i+1 ) = fft( fftshift(ts) ); % Increment count by hop size count = count + Ra; end % End for loop % Set output values for Moduli and Phase and return the matrices Mod_y = abs(Y); Ph_y = angle(Y); end % End ph_analyze.m

Synthesis Phase

Also based on Bernardini’s document  pv_synthesize.m Inputs: Mod_y, Ph_y, w, Rs, Ra Uses hanningz.m to create window Calculates difference between actual and target phases (delta phi) Recombines Moduli and Phase into Array of complex numbers

Synthesis Phase Performs IFFT and Overlap add Sum all samples using tapering window Final result is divided by absolute of the maximum value Output: outx

pv_synthesize.m function outx = pv_synthesize( Mod_y, Ph_y, w, Rs, Ra ) % pv_synthesize.m for ELEC484 Project Phase 1 % Set number of bins and frames based on the size of the phase matrix [ num_bins, num_frames ] = size (Ph_y); % Set matrix delta_phi to roughly the same size as the phase matrix delta_phi = zeros( num_bins, num_frames-1 ); % PF same size as Ph_y PF = zeros( num_bins, num_frames ); % Create tapering window win = hanningz(w);

pv_synthesize.m % Phase unwrapping to recover precise phase value of each bin % omega is the normal phase increment for Ra for each bin omega = 2 * pi * Ra * [ 0 : num_bins - 1 ]' / num_bins; for idx = 2 : num_frames ddx = idx-1; % delta_phi is the difference between the actual and target phases % pringcarg is a separate function delta_phi(:,ddx) = princarg(Ph_y(:,idx)-Ph_y(:,ddx)-omega); % phase_inc = the phase increment for each bin phase_inc(:,ddx)=(omega+delta_phi(:,ddx))/Ra; end % End for loop

pv_synthesize.m % Recombining the moduli and phase... % the initial phase is the same Ph_x(:,1) = Ph_y(:,1); for idx = 2:num_frames ddx = idx - 1; Ph_x(:,idx) = Ph_x(:,ddx) + Rs * phase_inc(:,ddx); end % Recombine into array of complex numbers Z = Mod_y.* exp( i * Ph_x ); % IFFT and overlap add % Create X of specified size X = zeros( ( num_frames * Rs ) + w, 1);

pv_synthesize.m count = 1; for idx = 1:num_frames endx = count + w - 1; real_ifft = fftshift( real( ifft( Z(:,idx) ))); X( [count:endx] )= X(count:endx) + real_ifft.* win; count = count + Rs; end % sum of all samples multiplied by tapering window k = sum( hanningz(w).* win ) / Rs; X = X / k; % Dividing by the maximum keeps things in proportion outx = X/abs(max(X)); end % end ph_synthesize.m

hanningz.m Used because hann() gives incorrect periodicity: w =.5*(1 - cos(2*pi*(0:n-1)'/(n)));

princarg.m Returns the principal argument of the nominal initial phase of each frame a=Phasein/(2*pi); k=round(a); Phase=Phasein-k*2*pi;

Cosine Wave Test 1 (w = Ra = Rs)

Cosine Wave (Ra = Rs = w/8)

Cosine Wave – Zoom

Toms Diner

Piano

Figure 8.1 (DAFX)

Time Stretching Modify hop size ratio between analysis (Ra) and synthesis (Rs) % Analysis function [Mod_y, Ph_y] = pv_analyze(inx, w, Ra); % Do Time Shifting here % % Modify hop size ratio hop_ratio = Rs / Ra; hop_ratio = 2; Rs = hop_ratio * Ra; % Synthesis function X2 = pv_synthesize( Mod_y, Ph_y, w, Rs, Ra );

Ratio = Rs/Ra = 0.5

Toms Diner

Piano

Ratio = Rs/Ra = 2

Toms Diner

Piano

Pitch Shifting Attempted to multiply a factor by the phase

Pitch Shifting % Analysis function [Mod_y, Ph_y] = pv_analyze(inx, w, Ra); % Do Pitch Shifting here % Ph_y = princarg(Ph_y*1.5); % Synthesis function X4 = pv_synthesize( Mod_y, Ph_y, w, Rs, Ra );

Pitch Shifting – Cosine

Pitch Shifting – Toms Diner

Pitch Shifting – Piano

Robotization Set phase (Ph_y) to zero % Analysis function [Mod_y, Ph_y] = pv_analyze(inx, w, Ra); % Do Robotization here % Ph_y = zeros(size(Ph_y)); % Synthesis function xout = pv_synthesize( Mod_y, Ph_y, w, Rs, Ra );

Robotization – Cosine

Robotization – Toms Diner

Robotization – Piano

Whisperization deliberately impose a random phase on a time- frequency representation % Analysis function [Mod_y, Ph_y] = pv_analyze(inx, w, Ra); % Do Whisperization here % Ph_y = ( 2*pi * rand(size(Ph_y, 1), size(Ph_y, 2)) ); % Synthesis function xout = pv_synthesize( Mod_y, Ph_y, w, Rs, Ra );

Whisperization – Cosine

Whisperization – Toms Diner

Whisperization – Piano

Denoising emphasize some specific areas of a spectrum

Stable Components Separation Calculate the instantaneous frequency by making the derivative of the phase along the time axis. Check if this frequency is within its “stable range”. Use the frequency bin or not for the reconstruction.

Transient Components Separation

Conclusion Rest of effects need to be properly implemented:  Stable/Transient Components Separation  Denoising

Questions? Thank you!