## Bandlimited Impulse Train Synthesis Essay

I'm trying to implement a audio synthesizer using this technique:

https://ccrma.stanford.edu/~stilti/papers/blit.pdf

I'm doing it in standard C, using SDL2_Mixer library.

This is my BLIT function implementation:

The idea is to combine it to generate a square wave, following the paper instructions. I setted up SDL2_mixer with this configuration:

And here's my function. It creates a bipolar impulse train, then it integrates it's value to generate a band-limited rect function.

My problem is: the resulting wave is quite ok, but after few seconds it starts to make noises. I tried to plot the result, and here's it:

Any idea?

EDIT: Here's a plot of the bipolar BLIT before integrating it:

caudiosdl-2synthesizersdl-mixer

the main idea behind BLIT is that these analog synth waveforms that we are trying to generate digitally can be thought of as the integral (over $t$) of impulse trains.

a sawtooth can be thought of as the integral of the sum of a little bit of DC and an impulse train. a square wave is the integral of impulses of alternating signs. the triangle wave is the integral of the square wave.

so, to create bandlimited waveforms of the above, the impulse trains are bandlimited which means that each impulse $\delta(t-t_n)$ is replaced by a $\operatorname{sinc}(t-t_n)$ function, which is that impulse bandlimited through a Nyquist brick-wall LPF. that sequence of bandlimited impulses is a BLIT.

then, since integration is a filter with s-plane transfer function of $H(s)=\frac{1}{s}$ and is LTI (Linear, Time-Invariant), integrating the BLITs will introduce no new frequency components. if your BLITs are bandlimited, so are the other waveforms that are derived from filtering the BLITs.