Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Modal synthesis of xilophone, marimba, glokenspiel, tubular bells
name
code content
// 1. define the synth ( SynthDef(\bell, { |fs=1, t60=1, pitchy=1, amp=0.25, gate=1| var sig, exciter; //exciter = Impulse.ar(0); exciter = WhiteNoise.ar() * EnvGen.ar(Env.perc(0.001, 0.05), gate) * 0.25; sig = Klank.ar( `[ [1, 2, 2.803, 3.871, 5.074, 7.81, 10.948, 14.421], // freqs [1, 0.044, 0.891, 0.0891, 0.794, 0.1, 0.281, 0.079], // amplitudes [1, 0.205, 1, 0.196, 0.339, 0.047, 0.058, 0.047]*t60 // ring times ], exciter, freqscale:fs*pitchy); sig = FreeVerb.ar(sig) * amp; DetectSilence.ar(sig, 0.001, 0.5, doneAction:2); Out.ar(0, sig!2); }).add ) // 2. Test a single note x = Synth(\bell, [\fs, 60.midicps, \t60, 9.177, \pitchy, 8]); // 3. Test different textures // glokenspiel ( Pbind( \instrument, \bell, \fs, Pseq( (60..72), 1).midicps, \t60, 6, \pitchy, 4, \dur, 0.25 ).play; ) // tubular bells ( Pbind( \instrument, \bell, \fs, Pseq( (60..72), 1).midicps, \t60, 9, \pitchy, 1, \dur, 1 ).play; ) // xilophone ( Pbind( \instrument, \bell, \fs, Pseq( (60..72), 1).midicps, \t60, 1, \pitchy, 4, \dur, 0.25 ).play; ) // marimba ( Pbind( \instrument, \bell, \fs, Pseq( (60..72), 1).midicps, \t60, 0.5, \pitchy, 1, \dur, 0.25 ).play; )
code description
Example of modal synthesis made with a **Klank** UGEN as _resonator_ and white noise impulse as an _exciter_. All resonators of the Klank UGEN are properly tuned to resamble modal frequencies of a real bell I've recoded and analysed. The ```fs```, ```pitchy``` and ```T60``` arguments are used to scale all the system in order to simulate various percussive instruments such as _xilophone_, _marimba_, _glokenspiel_ and _tubular bells_.
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