Csound Csound-dev Csound-tekno Search About

[Csnd] Ring Modulator

Date2013-09-07 11:12
FromSteven Yi
Subject[Csnd] Ring Modulator
Attachmentsringmod.csd  ringmod.blue  
Hi All,

I wanted to share an implementation of Julian Parker's digital model
of a Ring Modulator.  The paper he wrote from DAFx 2011 [1][2] was
also used by the BBC Radiophonic Workshop in the "Recreating the
sounds of the BBC Radiophonic Workhop using the Web Audio API" [3].

I've implemented the ringmodulator as a UDO, available in the attached
CSD and Blue project.  To run on the commandline, you can use a
commandline like:

csound -i adc -o dac -b 128 -B 512 ringmod.csd

The Blue project has knobs you can use to adjust the carrier's amp and
frequency. In the generated CSD, you can adjust gk_blue_auto0 for amp
and gk_blue_auto1 for frequency, or just modify the poscil line in
instr 1.

Note, the paper suggests using a high amount of oversampling (32x; 8x
or 16x being reasonable for using sinusoidal carrier).  This
implementation does not do oversampling, which I believe the BBC
version does do not as well.

As far as I've checked, the implementation matches the BBC one with
the exception of using a limiter instead of a compressor. Also, I did
one optimization to the wavetable generation to extract out a constant
in the part where v > vl, but this is a minimal optimization as the
wavetable generation is done only once really.

Enjoy!
steven

[1] - http://www.acoustics.hut.fi/publications/papers/dafx11-ringmod/
[2] - http://recherche.ircam.fr/pub/dafx11/Papers/66_e.pdf
[3] - http://webaudio.prototyping.bbc.co.uk/ring-modulator/