Canvas not supported


Csound Demo

Csound Demo

Csound is an audio programming language which can be used to do all sorts of neat audio synthesis. I was able to use it with Unity via a pretty great middleware implementation you can find here: Csound Unity

All the sound in the demo above is synthesized realtime through Csound, with no prexisting audio clips being used. It does this in the program I wrote via referencing scales that list notes in a series of frequencies.

Level generator voxel room Snippet showing the scales used

It then uses these to create sine waves of that frequency, and then uses some core audio synthesis techniques to create basic effects like distortion/clipping, filtering, reverb, etc to get the final output. The parameters that the game actually has access to are visible in the screenshot below.

Level generator voxel room Csound Parameters

Just a quick rundown of each of these.

Upper Note Range - controls the highest note that can be played from the selected scale.
Lower Note Range - controls the lowest note that can be played from the selected scale.
Scale - which of the frequency scales to use
Distortion - the amount of distortion clipping to apply
Lowpass - cuts higher frequencies depending on the cut off frequency (it's mapped to a midi range in game (0-127), so cutoff frequency isn't in hz).
SawWaveVel - Usually unused, it multiplies the initial sine wave with another saw wave to give a rougher texture.
Tempo - How fast to play the notes.