I think the confusion might be coming from the examples in the documentation, which tend to use Ndef.
(
Ndef(\vowel).fadeTime = 5;
Ndef(\vowel, {
var freqs, dBs, widths, out;
var baseFreq = LFNoise0.kr([5, 10] * 0.1).round(0.1).exprange(50, 200) * [2, 1.01];
#freqs, dBs, widths = (Vowel(\i, \soprano).blend(Vowel(\o, \bass), LFNoise1.kr(0.1265))).blend(Vowel(\e, \bass), LFNoise1.kr(10)).asArray;
//freqs = freqs * SinOsc.ar([0.1, 0.2, 0.3, 0.4].scramble, Rand(), 0.1, 1);
freqs = freqs * LFNoise1.ar([0.1, 0.2, 0.3, 0.4].scramble, 0.1, 1);
out = [freqs, widths, dBs.dbamp].flop.collect{ |args|
Formant.ar(baseFreq, *args);
}.flop;
out = out.collect{|vocal|
Splay.ar(vocal)
}.sum.postln;
out
* LFPulse.ar([9, 9.01], 0, 0.4).range(0, 1).lag(0.01, 0.5)
* LFPulse.ar(0.1, [0, 0.35], [0.9, 0.8]).lag(0.01)
* 0.1
}).play
)
As a SynthDef (probably a more useful way to do this, but it works):
(
SynthDef(\vowel, {
var freqs, dBs, widths, out;
var baseFreq = LFNoise0.kr([5, 10] * 0.1).round(0.1).exprange(50, 200) * [2, 1.01];
#freqs, dBs, widths = (Vowel(\i, \soprano).blend(Vowel(\o, \bass), LFNoise1.kr(0.1265))).blend(Vowel(\e, \bass), LFNoise1.kr(10)).asArray;
//freqs = freqs * SinOsc.ar([0.1, 0.2, 0.3, 0.4].scramble, Rand(), 0.1, 1);
freqs = freqs * LFNoise1.ar([0.1, 0.2, 0.3, 0.4].scramble, 0.1, 1);
out = [freqs, widths, dBs.dbamp].flop.collect{ |args|
Formant.ar(baseFreq, *args);
}.flop;
out = out.collect{|vocal|
Splay.ar(vocal)
}.sum;
Out.ar(out, out * LFPulse.ar([9, 9.01], 0, 0.4).range(0, 1).lag(0.01, 0.5) * LFPulse.ar(0.1, [0, 0.35], [0.9, 0.8]).lag(0.01) * 0.1);
}).add;
)
Synth(\vowel);
And you shouldn’t shy away from using the class either. It’s great if you’re after a convenient way to recreate more natural vowel sounds without spending time doing a bunch of research. My complaint is that it can start to get heavy rather quickly as I might try to build more flexible synths from it, but it’s definitely still useful. I’d just rather spend the CPU elsewhere most of the time.