Generating smoothed versions of square wave, triangular, etc
It seems the amplitude is not scaled properly. Rather than (2*A/pi) using (A/atan(1/delta)) seems more appropriate. In other words I propose: 

y = (A/atan(1/delta))*atan(sin(2*pi*t*f)/delta);

Below is a figure illustrating the difference between the two scaling approaches. For low delta values the difference is not clear but for high delta values the amplitude departs from what is desired. The images can be reproduced using the MATLAB code below. 





t=linspace(0,2*pi,500);
delta = 0.1;
A = 1;
f = 1/(2*pi);
y1 = A*sin(2*pi*t*f);
y2 = (2*A/pi)*atan(sin(2*pi*t*f)/delta);
y3 = (A/atan(1/delta))*atan(sin(2*pi*t*f)/delta);

figure; hold on;
h1=plot(t,y1,'r-','LineWidth',5);
h2=plot(t,y2,'g-','LineWidth',4);
h3=plot(t,y3,'b-','LineWidth',2);
legend([h1 h2 h3],{'Sine','Smooth square wave','Corrected smooth square wave'},'Location','SouthOutSide');
axis tight; axis square;
set(gca,'FontSize',15); grid on; box on;
drawnow;