function klaviatura(f)

if ~exist('f','var')
    f=0;
end
cla
hold on

F=174.6; %Frekvence F3

N=55;
tony=F*2.^((0:N)/12);

[m jj]=min(abs(f-tony));

cerne=[0 1 0 1 0 1 0 0 1 0 1 0 ];

x0=0;
for ii=1:N
    if cerne((mod(ii-1,12))+1)
%         h(ii)=fill([x0+0.26*[-1 1 1 -1]],[2 2 6 6],'k');
    else % bila klavesa 
        h(ii)=fill([x0+[0 1 1 0]],[0 0 6 6],'w');
        x0=x0+1;
    end
end

x0=0; %Druhy pruchod, prekryt bile cernymi
for ii=1:N
    if cerne((mod(ii-1,12))+1)
        h(ii)=fill([x0+0.26*[-1 1 1 -1]],[2 2 6 6],'k');
    else % bila klavesa 
%         h(ii)=fill([x0+[0 1 1 0]],[0 0 6 6],'w');
        x0=x0+1;
    end
end
if f
h(jj).FaceColor=[1 0 0];
end
axis tight