An interesting (to me at any rate) capability of SSCSSS is splitting the sound specified by the offset/filter/formant lines over more than one wave. This is specified by having more than one split per set and having different conditions for each split.
# Example 10 starts on the next line -- file ex10 voice ex10 Wv 0 28 103 set filter lowpass 0 -6 split 4 condition < 5 split 4 condition >= 5 # Example 10 ends on the previous line --
The first wave consists of samples generated using only the first 10 harmonics. The second wave consists of samples generated using any harmonics higher than 10. Note -- the second split / condition is not necessary if you only want the first wave.
# Example 11 starts on the next line -- file ex11 voice ex11 Wv 8 28 103 set filter lowpass 0 -6 split 4 condition < 10000 frequency split 4 condition >= 10000 frequency # Example 11 ends on the previous line --
If the word "frequency" follows the number, the number is interpreted as a frequency instead of an harmonic number.
# Example 12 starts on the next line -- file ex12 voice ex12 Wv 8 28 103 set filter lowpass 0 -6 split 4 condition % 2 1 split 4 condition % 2 0 # Example 12 ends on the previous line --
This example uses a modulus operator. This will seem weird at first, but read on. For this program, "% a b" means the following: if the remainder after integer division of the harmonic number by a equals b, include this harmonic. "% 2 1" mean "if the remainder of dividing the harmonic number by 2 equals 1", or more simply "if the harmonic number is odd". "% 2 0" means "if the harmonic number is even". In short the first wave gets the odd harmonics and the second wave the even harmonics. Remembering that the amplitudes of two elements in a voice can be modified independantly, this allows controlling the relative amounts of the odd and even harmonics. This is difficult to do with filters.