Here is a question which (up to some translation) I have been asked by an electrical engineer. Let $f:\mathbb{R}\to[0,1]$ be a smooth function with $f(x+1)=f(x)$. I would like to approximate $f$ in some sense by a characteristic function $\chi_A$, where $A\subset\mathbb{R}$ is also $\mathbb{Z}$-periodic. The idea is that $A$ should be a disjoint union of very short intervals, such that for any moderately short interval $J$ centred at $x$, the measure of $A\cap J$ should be close to $f(x)$ times the length of $J$. One possibility is to fix a large integer $N$ and put $$ A = \bigcup_{k\in\mathbb{Z}} [k/N,(k+f(k/N))/N], $$ but more complicated schemes could also be used. The quality of approximation should probably be measured by a norm of the form $$ \|g\| = \left(\sum_n a_n|c_n(g)|^2 \right)^{1/2}, $$ where $c_n(g)$ is the $n$'th Fourier coefficient, and the $a_n$ are positive constants depending on the application.

Is there any literature on this kind of question?