NEU, OUT NOW:

Lyrik — 12/20 

fileID = fopen('sound.txt','r');

formatSpec = '%f %f %f';

sizeA = [3 Inf];

 

 

ft_path = '/data/pt_02058/megdata/speech/analysis/software/fieldtrip/';

addpath(ft_path)

ft_defaults

 

addpath('/data/pt_02058/megdata/speech/analysis/software/brewermap')

 

 

% colors = brewermap(5, 'Set1');

colors = brewermap(5, 'PrGn');

figure, plot(A(1,:)/44100,A(2,:),'color',colors(1,:))

box off

axis([0 120, -1.2 1.2])

set(gcf,'color','w')

title('Second column','FontSize',12)

xlabel('Time in seconds','FontSize',10)

ylabel('Sound amplitude','FontSize',10)

 

fig = gcf;

style = hgexport('factorystyle');

style.Bounds = 'loose';

hgexport(fig,'Figure.eps',style,'applystyle', true);

drawnow;

 

print('column_2', '-djpeg')

 

figure, plot(A(1,:)/44100,A(3,:),'color',colors(1,:))

box off

axis([0 120, -2.8*10^(-5) 2.8*10^(-5)])

set(gcf,'color','w')

title('Third column','FontSize',12)

xlabel('Time in seconds','FontSize',10)

ylabel('Sound amplitude','FontSize',10)

 

fig = gcf;

style = hgexport('factorystyle');

style.Bounds = 'loose';

hgexport(fig,'Figure.eps',style,'applystyle', true);

drawnow;

 

print('column_3', '-djpeg')

 

%

data = [];

data.label = {'col2'};

data.fsample = 44100;

data.trial{1}   = A(2,:);

data.time{1}   = A(1,:)/44100;

 

cfg              = [];

cfg.output       = 'pow';

cfg.channel      = 'col2';

cfg.method       = 'mtmconvol';

cfg.taper        = 'hanning';

cfg.foi          = 20:1:4000;                         % analysis 2 to 30 Hz in steps of 2 Hz

cfg.t_ftimwin    = ones(length(cfg.foi),1).*0.4;   % length of time window = 0.5 sec

cfg.toi          = 0:0.2:120;

% time window "slides" from -0.5 to 1.5 sec in steps of 0.05 sec (50 ms)

TFRhann = ft_freqanalysis(cfg, data);

 

cfg = [];

cfg.baseline     = [0 1];

cfg.baselinetype = 'relchange';

cfg.zlim         = [0 200];

ft_singleplotTFR(cfg, TFRhann);

title('TFR, second column','FontSize',12)

xlabel('Time in seconds','FontSize',10)

ylabel('Frequency in Hz','FontSize',10)

 

 

colormap(brewermap(256, '*Spectral'));

% colormap(brewermap(256, 'YlOrRd'));

 

fig = gcf;

style = hgexport('factorystyle');

style.Bounds = 'loose';

hgexport(fig,'Figure.eps',style,'applystyle', true);

drawnow;

 

print('TFR_column_2', '-djpeg')