-
Notifications
You must be signed in to change notification settings - Fork 0
/
cerkutClass.m
34 lines (28 loc) · 942 Bytes
/
cerkutClass.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
classdef cerkutClass < audioPlugin
%INCLASS Summary of this class goes here
% Detailed explanation goes here
properties
Width = 1;
end
properties (Constant)
PluginInterface = audioPluginInterface( ...
audioPluginParameter('Width', 'Mapping',{'lin',0,10}))
end
methods
function out = process(obj,in)
[m,n] = size(in);
X = fft(in,m*2);
XHalf = X(1:m+1,:);
out = zeros(m,n);
for i = 1:n % Channels
YmagHalf = abs(XHalf(:,i));
YmagHalf(6) = YmagHalf(6)*obj.Width;
YHalf = YmagHalf.*exp(1i*angle(XHalf(:,i)));
reverseYHalf = flipud( conj(YHalf(2:end-1)) );
Y = [YHalf;reverseYHalf];
y = real(ifft(Y));
out(:,i) = y(1:m);
end
end
end
end