DSP Implementation
503
Figure 44.4
Stator.
In figure 44.4 we see the second sound source in
the motor model. Pulse-like vibrations are obtained
using a cosine raised according to
y
= 1
/
(
x
2
+ 1),
which with a multiplier of 2
.
0 before the
gives
a pulse wave at 4 times the base frequency and 1
/
4
the original width. This sounds harder and thinner
than a cosine of the same frequency. The output
is scaled by
stator-level
after shifting by 0
.
5 to
recentre it. Narrower pulse widths give the motor
sound a smaller and faster feel. Mixing the stator,
brushes, and rotor is a matter of taste. According to
our model the stator should run at a subharmonic
of the rotor, which is not the case in the example
because a higher stator whine seems to work bet-
ter. You should find you need only a small amount
of the noisy brush sound to create the right effect,
but if you want a harder or less stable motor that
sounds a bit old then play with the noise band pass or
try adding some jitter noise to the phasor frequency
inlet.
brush-level
rotor-level
max-speed
volume
runtime
go
stator-level
Figure 44.5
Motor.
Combining these with a master oscillator and GUI
components in figure 44.5 we have a bang button to
start running the motor envelope and six normalised
sliders which send parameters to the model. The first
sets the total time, start plus stop. This value is picked
up by the
runtime
receive object just above the float
box and multiplied by 20
,
000ms (20s). Upon receipt of
a bang message the float object sends this time value
to the envelope, which then rises and falls. Three more
faders set the levels for different sonic components, a
pulse-like wave from the stator vibration, noise bursts
from the brushes, and a click-like sound from the
rotor. A copy of the envelope, signal on the left branch
modulates overall amplitude, since the sound intensity
roughly matches the motor speed. A copy of the enve-
lope signal on the right branch goes to
via a
scaling which determines the maximum motor speed.
To make the phasor negative going
max-speed
is mul-
tiplied by a negative number. The phasor then drives
two subpatches, giving the noisy rotor spikes and the
pulsating stator body. They are summed explicitly
before a volume envelope is applied, then finally mul-
tiplied by
volume
.
This next trick can be tried as an experimental alternative to a delay-based
resonant housing. The fixed frequency peaks (or formants) from an object body
Do'stlaringiz bilan baham: |