Columns

Weekly

Beginners

Synthesis

Processing

Real-Time

Departments

Editorial

Contribute

Back Issues

## Orchestra and Score of the Week

Hans Mikelson

hans@csounds.com

Spatial Audio in Flatland

space2d.orc space2d.sco algcmp.wav limit.wav

This is a spatial audio system I wrote using Csound a couple of years ago. I have tried to implement the following:

Moving sound source with table supplied moving X and Y coordinates, volume decreases as 1/r^2, filtering of sound due to air absorption, Doppler effect due to moving sound, simplified HRTF for head shadow filtering, inter ear time delay, speaker cross-talk cancellation based on both inter-ear time delay & head shadowing, room reverberation which varies with distance.

The algorithm is 2-dimensional and does not attempt to introduce height cues...but that might be a fun exercise for someone ambitious.

Mass-Spring with Noise

I was asked to provide a flow diagram of this system and after some thought I decided that it was best to consider the mass spring system as a single block. Otherwise it will no longer make sense when you replace the simple Euler approximation with a more complex Runge-Kutta approximation.

This is a simulation of a mass on a spring being stimulated by noise. This is one of the simplest physical models. This example is based on the following:

so

Next use Euler's method to update the position of the mass on the spring:

Notice that a damping factor is used on the velocity.

Machine Language

machine.orc machine.sco machine.wav (349K) machine.mp3 (251K)

A variation on my industrial noise. This example loops a small section of a sample and passes it through a filter. The cut-off frequency of the filter is passed as a table to the instrument. Use any complex sample with it or download machine.wav. This can be used to create sounds like industrial machinery.

Electric Snare

Here is a simulation of a drum machine snare. I start with an impulse from vco and filter it for the drum tone. I mix in some high pass filtered noise for the spring.

Fractal Static

This instrument uses a dynamical system to generate intermittent "pops" which sounds ranging from a scratchy record to a glass being filled with soda.

Crunchy Synth

This is a crunchy little analog sounding synthesizer. The low pass filter resonance is "extracted" and passed through a waveshaper to clip it before it is rejoined with the low pass signal.

Chimes

This is an instrument created by generating two spherical lissajous curves and applying an exponential envelope to them. For more information on the spherical lissajous curve see the Spring 1999 issue of Csound Magazine. The spreadsheet file can be used to generate random chime sound events. Save the file as a text file named chime2.sco or something similar. The score provided was generated in part by using this spreadsheet.