Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Wine Glass Code - Edited
name
code content
// Wine Glass Sound ( SynthDef("AM", { arg freq = 523.25, modfreq = 1, amp = 0.5, attack = 2, dur = 5, pos = 0; var carrier, modulator, env; modulator = SinOsc.kr(modfreq).range(0, 1); carrier = SinOsc.ar(freq: freq, mul: modulator); env = Env.perc(attackTime: attack, releaseTime: dur - attack, level: amp).kr(2); carrier = carrier * env; Out.ar(0, Pan2.ar(carrier, pos)) }).add; ) ( Pbind( \instrument, "AM", \note, 15, \dur, 10, \amp, Pwhite(0.5, 0.1), \att, 1, \rel, 10 ).play; ) // changes to the modfreq in SynthDef "AM1" -- rougher rubbing against the glass ( Pbind( \instrument, "AM", \note, 15, \dur, 10, \amp, Pwhite(0.5, 0.1), \att, 1, \rel, 10, \modfreq, 10 ).play; ) // even higher modfreq -- greater number of voices ( Pbind( \instrument, "AM", \note, 15, \dur, 10, \amp, Pwhite(0.5, 0.1), \att, 1, \rel, 10, \modfreq, 1000 ).play; )
code description
This is an addition to my first code of wine glass sound: "The friction between a finger dipped in water and the edge of a wine glass creating a sound." I have added a couple more synthdefs/codes to demonstrate the differences when modfreq is changed. A higher modfreq changes the purity of the tone.
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change