Foldy

Music synthesizer/sequencer using wavefolding for tone generation

Technologies: Java, Java Sound API

Foldy is a music app that writes buffers of 16bit sound amplitude values to an output line provided by the Java Sound API. It takes a sequence of pitch values (as MIDI note numbers) and generates a tone for each one by wavefolding a sine wave.

I used a Taylor series with 3 terms to approximate a sine function, taking inspiration and some bitwise tricks from this article article

More info