Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Vowel synthesis even/odd Harmonics with DynKlang
name
code content
( { // even odd harmonics var baseFreq = 100; var numFreqs = 69; var vowel = Vowel(\a, \bass); var startFilterOrder = 4.0; var stopFilterOrders = [0.8, 0.65, 0.5, 0.35, 0.1]; var freqs, evenFreqs, oddFreqs, amps, evenAmps, oddAmps, orders; var dur = 12; var evenAmpMod = SinOsc.kr(freq: 1).exprange(0.04, 1).sqrt; var oddAmpMod = SinOsc.kr(freq: 1, phase: pi).exprange(0.04, 1).sqrt; var ampEnv = Env.linen(attackTime: 0.01, sustainTime: dur, releaseTime: 0.2).kr(doneAction: 2); evenFreqs = ((1, 3 .. numFreqs) * baseFreq); oddFreqs = ((2, 4 .. numFreqs) * baseFreq); // there are 5 formants in each vowel, ergo 5 filter orders may be provided orders = stopFilterOrders.collect{|stop, i| XLine.kr(startFilterOrder, stop, dur * ( 4 + (2 * i)/dur)) }; evenAmps = vowel.ampAt(evenFreqs, orders ) * evenAmpMod; oddAmps = vowel.ampAt(oddFreqs, orders ) * oddAmpMod; freqs = evenFreqs ++ oddFreqs; amps = evenAmps ++ oddAmps; amps = amps.normalizeSum; // tame amplitudes DynKlang.ar(`[freqs, amps , nil] ) * 0.1 * ampEnv; }.play )
code description
cleaned-up code for "Figure 6" of the paper "A SUPERCOLLIDER CLASS FOR VOWEL SYNTHESIS AND ITS USE FOR SONIFICATION" (doi: https://pub.uni-bielefeld.de/record/2277122 )
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