[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] SCLang crashed by simple switch statement?
It's a compiler issue -- there have been problems with switch before.
Until that's fixed, you can recast vtc as a dictionary:
~vtcdict = Dictionary[
"i:" -> {~tract.set(\f1, 300, \f2, 2300, \vnmix, 1.0)},
"i" -> {~tract.set(\f1, 360, \f2, 2100, \vnmix, 1.0)},
etc.;
];
~vtc = { |phoneme|
~vtcdict[phoneme].value;
};
hjh
On Sep 3, 2005, at 8:18 AM, Dan Stowell wrote:
(~vtc = {|phoneme|
switch(phoneme,"i:", {~tract.set(\f1, 300, \f2, 2300, \vnmix, 1.0)},"i", {~tract.set(\f1, 360, \f2, 2100, \vnmix, 1.0)},"e", {~tract.set(\f1, 570, \f2, 1970, \vnmix, 1.0)},"a", {~tract.set(\f1, 750, \f2, 1750, \vnmix, 1.0)},"a:", {~tract.set(\f1, 680, \f2, 1100, \vnmix, 1.0)},"o", {~tract.set(\f1, 600, \f2, 900, \vnmix, 1.0)},"o:", {~tract.set(\f1, 450, \f2, 740, \vnmix, 1.0)},"u", {~tract.set(\f1, 380, \f2, 950, \vnmix, 1.0)},"u:", {~tract.set(\f1, 300, \f2, 940, \vnmix, 1.0)},"ᴧ", {~tract.set(\f1, 720, \f2, 1240, \vnmix, 1.0)},"ə:", {~tract.set(\f1, 580, \f2, 1380, \vnmix, 1.0)});
};)~vtc.value("a");
: H. James Harkins
: jamshark70@xxxxxxxxxxxxxxxxx
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman