Sound Synthesis II: SMS Frequency/Time Transformation Examples
Here is a clarinet sound used for the demos on this page:
cl-mf-c4.wav. To make good
frequency/time transformations with SMS, you need to successfully segregate
the deterministic components of the sound from the stocastic components;
Otherwise, you will get noticeable artifacts appearing in the
transformed sound (which you may or may not want).
To test that you have separated the noise from the pitched part
of a sound, try to remove all of the pitched part from the sound
and listen to the noise. Here is an example of how to do that:
Analysis file:
InputSoundFile cl-mf-c4.wav
OutputSmsFile temp.sms
nSines 60
HighestPitch 269
SineModel 1
FrameRate 344.53125
LowestPitch 254
|
|
Synthesis file:
InputSmsFile temp.sms
OutputSoundFile 1.wav
Type 2
SamplingRate 44100
|
|
The above analysis shows that the attack and release are not quite
right. It is good enough for now, but you could try modifying the
parameters AttackReanalysis for better results, as well
as MagThreshold. Notice that Type = 2 in the
synthesis file means to synthesize the residual sound (usually noise)
only. The FrameRate of 344.53125 is needed to make
a window size of 128 samples at 44100 Hz.
Changing the pitch without changing the duration
The following example analysis/synthesis score-file pair
will generate a sound which is an octave higher than the original:
Analysis file:
InputSoundFile cl-mf-c4.wav
OutputSmsFile temp.sms
nSines 60
HighestPitch 269
SineModel 1
FrameRate 344.53125
LowestPitch 254
|
|
Synthesis file:
InputSmsFile temp.sms
OutputSoundFile 2.wav
Type 1
FreqSine 2
SamplingRate 44100
|
|
The output sound, 2.wav, does not contain any of the residual sound, because the Type was set to
1 which means synthesize only the sinusoidal components from the analysis.
To do non-octave transpositions, you can refer to the
Pitch Tranpositions Scalings page in
order to calculate the correct value for the FreqSin
synthesis parameter.
Changing duration without changing pitch
The SMS synthesis parameter TimeStretch can be
used to change the duration of the sound independently from the
pitch. The following example analysis/synthesis pair will
create an output sound which is 4 times longer than the original sound.
Analysis file:
InputSoundFile cl-mf-c4.wav
OutputSmsFile temp.sms
nSines 60
HighestPitch 269
SineModel 1
FrameRate 344.53125
LowestPitch 254
|
|
Synthesis file:
InputSmsFile temp.sms
OutputSoundFile 3.wav
Type 1
TimeStretch 4
SamplingRate 44100
|
|
Refer to the NoUnvoicedTimeStretching parameter if you are changing the duration of a speech sound which you want
to sound more natural.
Changing even/odd harmonics
There are many amplitude modification parameters in the
SMS analysis parameters. Below is an example of removing the even and
odd harmonics from a clarinet sound.
For some reason the AmpSineOdd parameter controls the
amplitude of the even partials, while the AmpSineEven
parameter controls the amplitude of the odd partials.
This example removes the odd harmonics:
Analysis file:
InputSoundFile cl-mf-c4.wav
OutputSmsFile temp.sms
nSines 60
HighestPitch 269
SineModel 1
FrameRate 344.53125
LowestPitch 254
|
|
Synthesis file:
InputSmsFile temp.sms
OutputSoundFile 4.wav
Type 1
TimeStretch 3
AmpSineEven 0
SamplingRate 44100
|
|
This example removes the even harmonics:
Analysis file:
InputSoundFile cl-mf-c4.wav
OutputSmsFile temp.sms
nSines 60
HighestPitch 269
SineModel 1
FrameRate 344.53125
LowestPitch 254
|
|
Synthesis file:
InputSmsFile temp.sms
OutputSoundFile 5.wav
Type 1
TimeStretch 3
AmpSineOdd 0
SamplingRate 44100
|
|
Stretched/Shifted harmonics
The SMS synthesis parameter FrequencySineStrech
can be used to stretch the harmonics, making them more or less harmonic.
For example, if the harmonics were 100, 200, 300; you could stretch
them like this 100, 205, 310, etc. Here is an example with a
stretched set of harmonics:
Analysis file:
InputSoundFile cl-mf-c4.wav
OutputSmsFile temp.sms
nSines 16
HighestPitch 269
SineModel 1
FrameRate 344.53125
LowestPitch 254
|
|
Synthesis file:
InputSmsFile temp.sms
OutputSoundFile 6.wav
Type 1
FreqSineStretch 0.05
SamplingRate 44100
|
|
The above example has a frame-rate problem caused by the sms program
which will have to be identified later.
The shift operation keeps a constant interval between harmonics.
The FreqSineStretch parameter keeps the frequency difference
between harmonics constant, but not the interval. Here is an example of
shifting the harmonics by 10 Hz:
Analysis file:
InputSoundFile cl-mf-c4.wav
OutputSmsFile temp.sms
nSines 16
HighestPitch 269
SineModel 1
FrameRate 344.53125
LowestPitch 254
|
|
Synthesis file:
InputSmsFile temp.sms
OutputSoundFile 7.wav
Type 1
FreqSineShift 100
SamplingRate 44100
|
|
Exercises
- Choose some sound(s) to transform in frequency and/or pitch.
Do several of the example transformations on the sounds and
present them to the class on Thursday.
Refer to the Analysis
Parameters and Synthesis
Parameters as you create your example transformations.
- Try some transformations on speech. For example, try
NoUnvoicedTimeStretching on
a voice which is slowed down by a factor of 3.
- Give a speech sound a clarinet-like timbre.
- Extra Credit: Transform the pitches of several instrument
either from very high to very low, or vice-versa, keeping the
duration constant. Have other people listen to the transformed pitch
and see how well they can identify the instrument with/without the
transpositions.
|