Main Archive Specials Wiki | FAQ Links Submit Forum


Simple Time Stretching-Granular Synthesizer

References : Posted by Harry-Chris

Notes :
Matlab function that implements crude time stretching - granulizing function, by overlap add in time domain.

Code :
function y = gran_func(x, w, H,H2, Fs, tr_amount)


% x -> input signal
% w -> Envelope - Window Vector
% H1 -> Original Hop Size
% H2 -> Synthesis Hop Size
% Fs -> Sample Rate
% str_amount -> time stretching factor


M = length(w);

pin = 1;
pend = length(x) - M;


y = zeros(1, floor( str_amount * length(x)) +M);


count = 1;
idx = 1;

while pin < pend

input = x(pin : pin+M-1) .* w';


y(idx : idx + M - 1) = y(idx : idx + M - 1) + input;

pin = pin + H;
count = count + 1;
idx = idx + H2;

end




Comments

There are no comments on this item

Add your own comment
Comments are displayed in fixed width, no HTML code allowed!
Email:

Comment:

Are you human?



Site created and maintained by Bram
Graphic design by line.out | Server sponsered by fxpansion