Skip to content

Instantly share code, notes, and snippets.

@jacobjoaquin
Created September 29, 2010 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacobjoaquin/603015 to your computer and use it in GitHub Desktop.
Save jacobjoaquin/603015 to your computer and use it in GitHub Desktop.
Ring Modulation
Jacob Joaquin
September 29, 2010
jacobjoaquin@gmail.com
csoundblog.com
<CsoundSynthesizer>
<CsInstruments>
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1
0dbfs = 1.0
instr 1
iamp = p4 ; Amplitude
ifreq1 = p5 ; Frequency of oscillator 1
ifreq2 = p6 ; Frequency of oscillator 2
a1 oscils iamp, ifreq1, 0 ; Oscillator 1
a2 oscils iamp, ifreq2, 0 ; Oscillator 2
aring = a1 * a2 ; Ring modulation
out aring ; Output audio
endin
</CsInstruments>
<CsScore>
i 1 0 1 0.707 440 1
i 1 + . . . 2
i 1 + . . . 4
i 1 + . . . 8
i 1 + . . . 16
i 1 + . . . 32
i 1 + . . . 64
i 1 + . . . 128
i 1 + . . . 256
i 1 + . . . 512
i 1 + . . . 1024
i 1 + . . . 2048
</CsScore>
</CsoundSynthesizer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment