## Shakers from Perry Cook's STK2

The shaker suite (shakerActor, shakerHand, shakerAlg) makes calls into Perry Cook's STK2 (Synthesis ToolKit), generating various kinds of gourd shaking sounds based on PhISEM (Physically Informed Stochastic Event Modeling).

To use the shaker implementation, load`perry.so` and create an actor of type `ShakerActor`.

### ShakerActor messages

In addition to the messages understood by all generator actors, the ShakerActor understands the following messages:

SetReverb `hActor x`
  Turn on reverb for new instances created by this actor to `x`. (1 = ON, 0 = OFF)
SetAllReverb `hActor x`
  Turn on reverb of all children to `x`, and set the default reverb flag for all future children. (1 = ON, 0 = OFF)
SetShakerType `hActor x`
  Set the shaker type for new instances created by this actor to `x`. Valid range is [0,7]. The number maps to the following shakers: 0- maraca, 1- sekere, 2- cabasa, 3- bamboo windchime, 4- water drops, 5- tambourine, 6- sleighbells and 7- guiro.

- Maraca: A Latin-American percussion instrument made from the dried shell of a gourd or other material with beans or beads, etc., inside to produce a rattling sound; a gourd rattle.
- Sekere: A Yoruba gourd-rattle. Yoruba, Sudanic-speaking African people inhabiting southwest Nigeria.
- Cabasa: A Cuban percussion instrument made of a hollow gourd enclosed in a net of threaded beads.
- Guiro: Consisting usually of a gourd with a serrated surface, the rubbing of which produces a rasping sound.

SetAllShakerType `hActor x`
  Set the shaker type of all children to `x`, and set the default value for all future children.
SetShakerNum `hActor x`
  Set the number of shaking objects for new instances created by this actor to `x`. Valid range is [0,127]. The bigger value, the more collision thus the denser the sound.
SetAllShakerNum `hActor x time`
  Set the number of shaking objects of all children to `x`, and set the default value for all future children. If `time` is specified, children will modulate to the new value over the specified duration. Default value is always set immediately regardless of `time`.
SetShakerRes `hActor x`
  Set the shaker resonance for new instances created by this actor to `x`. Valid range is [0,127]. The bigger value, the higher resonance frequency of the sound. Only effective for shaker type 0, 1, 2 and 7.
SetAllShakerRes `hActor x time`
  Set the shaker resonance of all children to `x`, and set the default value for all future children.
SetShakerDecay `hActor x`
  Set the decay time of shaker for new instances created by this actor to `x`. Valid range is [0,127]. The bigger value, the longer the sound lasts.
SetAllShakerDecay `hActor x time`
  Set the decay time of shaker of all children to `x`, and set the default value for all future children.
SetShakerEnergy `hActor x`
  Set the shake energy for new instances created by this actor to `x`. Valid range is [0,127]. The bigger value, the longer and louder the sound is. Sending this message actually means to shake the shaker, with the force of the shake corresponds to `x`. Therefore, once a shaker instance is created, it can always be shook using this message.
SetAllShakerEnergy `hActor x time`
  Set the shaker energy of all children to `x`, and set the default shake energy for all future children.

### shaker handler messages

In addition to the messages understood by all handlers, the handler for the shaker algorithm understands the following messages:

SetReverb `hSound x`
  Toggle reverb (1 = on, 0 = off).
SetShakerType `hSound x`
  Set the shaker type to `x`. Valid range is [0,7].
SetShakerNum `hSound x time`
  Set the shaker number to `x`. If `time` is specified, modulate to the new value over the specified duration. Valid range is [0,127].
SetShakerRes `hSound x time`
  Set the shaker resonance to `x`. Valid range is [0,127].
SetShakerDecay `hSound x time`
  Set the shaker decay to `x`. Valid range is [0,127].
SetShakerEnergy `hSound x time`
  Set the shaker energy to `x`. Valid range is [0,127].