Question

Make a simple code of matlab, of autotune or a vocoder

Make a simple code of matlab, of autotune or a vocoder

Homework Answers

Answer #1

We consider a code of building an LPC vocoder.

function [A,G,a,r]=autolpc(x,p)

%

% function to computer the autocorrelation method solution

%

% Inputs:

% x is the signal frame (usually speech weighted by a window)

% p is the lpc model order

%

% Outputs:

% A is the denominator vector for the lpc solution, i.e.,

% A=1-a1z^{-1}-a2z^{-2}-...-apz^{-p}

% G is the lpc model gain (rms prediction error)

% a is the lpc polynomial (without the 1 term)

% r is the vector of autocorrelation coefficients

% see also ATOK, KTOA, RTOA

% solve for the lpc polynomial using a simple matrix inversion method

L=length(x);

r=[];

for i=0:p

r=[r; sum(x(1:L-i).*x(1+i:L))];

end

R=toeplitz(r(1:p));

a=inv(R)*r(2:p+1);

A=[1; -a];

G=sqrt(sum(A.*r));

end

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Matlab equation solve code please show me the code for how to solve x=1-e^-2x in Matlab...
Matlab equation solve code please show me the code for how to solve x=1-e^-2x in Matlab with explanation show me the code and result
if subtraction and scaling on images is possible in matlab then provide the source code for...
if subtraction and scaling on images is possible in matlab then provide the source code for them??
Code in Matlab. I need to make a diamond shape with * I get part of...
Code in Matlab. I need to make a diamond shape with * I get part of it with the code below. Instructions are: " Given the value of N print diamond of N + (N-1) rows. For example, if N = 5 it should print a diamond." clc clear n = input ('number of rows \n') o = input ('number of inverted rows \n') t = (o-1) for i = 1:n for k = 1:n-i fprintf (' '); end for...
MATLAB CODE REQUIRED Consider the problem of estimating y(0.5) for the boundary-value problem y''+ y' =...
MATLAB CODE REQUIRED Consider the problem of estimating y(0.5) for the boundary-value problem y''+ y' = y + 2, y(0) = 0, y'(1) = 2. Find the solution using 2 approaches: (b) Use finite difference with n = 10.Please provide Matlab code. What is y(0.5) value with Matlab? (c) Using bvp4c. Please provide Matlab code. What is y(0.5) value with Matlab?
The following code must be written in Matlab I want to print the following in Matlab...
The following code must be written in Matlab I want to print the following in Matlab (x1,x2, x3, ....xn) = (0.33333, 0.33333, 0.33333,....) That is for n variables . The whole thing should be on the same line. I need to use fprintf and write out the coordinates with 5 decimal places of variable xn = (0.33333, 0.33333, 0.33333,....) Thanks!
Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal, and -1...
Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal, and -1 on the super- and sub-diagonal. Then replace the (1,1) element of A with a 1. (Make your commands capable of handling an arbitary sized NxN matrix by first defining N=5, then using the variable N as the size in each of the commands.)
The following code must be written in matlab How to convert a 4d unit8 matrix of...
The following code must be written in matlab How to convert a 4d unit8 matrix of size 28 28 1 50000 in Matlab to a matrix of size 784*5000 Give an example that clearly solves this issue. Thanks
Given a matrix of torque and speed of engine in MATLAB. Write a code to obtain...
Given a matrix of torque and speed of engine in MATLAB. Write a code to obtain maximum output of engine at certain torque and speed of engine.
write a matlab code to calculate the correlation coefficient for five neighboring pixels an in an...
write a matlab code to calculate the correlation coefficient for five neighboring pixels an in an image preferable ( 256 x 256 ) lena image
Exercise 1: Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal,...
Exercise 1: Write MATLAB code to create a 5x5 matrix A with 2's on the diagonal, and -1 on the super- and sub-diagonal. Then replace the (1,1) element of A with a 1. (Make your commands capable of handling an arbitary sized NxN matrix by first defining N=5, then using the variable N as the size in each of the commands.)