p0 = output start time (seconds) p1 = duration (seconds) p2 = amplitude (absolute, for 16-bit soundfiles: 0-32768) p3 = energy (0.0-1.0) p4 = decay (0.0-1.0) p5 = # of objects (0.0-1.0) p6 = resonance freq (0.0-1.0) p7 = instrument selection (0-22 -- see the Usage Notes below) p8 = pan (0-1 stereo; 0.5 is middle) [optional; default is 0.5] p2 (amplitude), p3 (energy), p4 (decay), p5 (# of objects), p6 (resonance frequency) and p8 (pan) can receive dynamic updates from a table or real-time control source. Author: Brad Garton, based on code from the Synthesis ToolKit
Here's what Perry says about "Shakers":
PhOLIES (Physically-Oriented Library of Imitated Environmental Sounds) is a similar approach for the synthesis of environmental sounds. This class implements simulations of breaking sticks, crunchy snow (or not), a wrench, sandpaper, and more.
- Maraca = 0 - Cabasa = 1 - Sekere = 2 - Guiro = 3 - Water Drops = 4 - Bamboo Chimes = 5 - Tambourine = 6 - Sleigh Bells = 7 - Sticks = 8 - Crunch = 9 - Wrench = 10 - Sand Paper = 11 - Coke Can = 12 - Next Mug = 13 - Penny + Mug = 14 - Nickle + Mug = 15 - Dime + Mug = 16 - Quarter + Mug = 17 - Franc + Mug = 18 - Peso + Mug = 19 - Big Rocks = 20 - Little Rocks = 21 - Tuned Bamboo Chimes = 22Increasing parameter p3 ("ENERGY") will tend to keep the instrument going. Parameter p4 ("DECAY" interacts with the natural decay of the shaker. If p4 > 1.0 the instrument will go for a loooong time (be careful!).
MSHAKERS can produce other mono or stereo output.
Sample Scores
very basic:
rtsetparams(44100, 2)
load("MSHAKERS")
st = 0
inst = 0
for (j = 0; j < 23; j = j+1)
{
for (i = 0; i < 7; i = i+1)
{
MSHAKERS(st, 0.5, 20000, 0.9, 0.8, 0.5, 0.7, inst)
st = st + 0.2
}
inst = inst + 1
}
rtsetparams(44100, 2)
load("MSHAKERS")
st = 0
numobjs = 0
for (i = 0; i < 20; i = i+1)
{
MSHAKERS(st, 0.5, 30000, 0.8, 0.8, numobjs, 0.1, 0)
numobjs = numobjs + 0.05
st = st + 0.2
}
st = st + 0.5
energy = 0
for (i = 0; i < 20; i = i+1)
{
MSHAKERS(st, 0.5, 30000, energy, 0.8, 0.5, 0.1, 0)
energy = energy + 0.05
st = st + 0.2
}
st = st + 0.5
decay = 0
for (i = 0; i < 20; i = i+1)
{
MSHAKERS(st, 0.5, 30000, 0.8, decay, 0.5, 0.1, 0)
decay = decay + 0.05
st = st + 0.2
}
st = st + 0.5
resofreq = 0
for (i = 0; i < 20; i = i+1)
{
MSHAKERS(st, 0.5, 30000, 0.8, 0.8, 0.5, resofreq, 0)
resofreq = resofreq + 0.05
st = st + 0.2
}
rtsetparams(44100, 2)
load("MSHAKERS")
MSHAKERS(0, 3.5, 4*20000, 0.9, 1.05, 0.5, 0.7, 1)
amp = maketable("line", 1000, 0,0, 1,1, 2,1, 2.1,0)
MSHAKERS(4, 3.5, amp*5*20000, 0.9, 1.05, 0.5, 0.7, 3)
energy = maketable("line", "nonorm", 1000, 0,0, 1,0.2, 2,0)
resonance = makeLFO("tri", 3.5, 0.3, 0.4)
MSHAKERS(8, 3.5, 5000, energy, 0.1, 0.5, resonance, 14)
decay = maketable("line", "nonorm", 1000, 0,1, 1,1.1, 2,0)
pan = maketable("line", 1000, 0,1, 1,0.3, 2,0.7, 3,0, 4,1, 5,0)
MSHAKERS(12, 3.5, 3*20000, 0.9, decay, 0.5, 0.7, 19, pan)
nobjs = maketable("line", 1000, 0,1, 1,0, 3,1)
energy = maketable("line", "nonorm", 1000, 0,0.1, 1,0.2, 2,0)
MSHAKERS(15, 5.5, 5000, energy, 0.1, nobjs, 0.7, 5)