Audio output is a tone related to the shaking of a maraca or similar gourd instrument. The method is a physically inspired model developed from Perry Cook, but re-coded for Csound.
idecay -- If present indicates for how long at the end of the note the shaker is to be damped. The default value is zero.
A note is played on a maraca-like instrument, with the arguments as below.
kamp -- Amplitude of note.
kfreq -- Frequency of note played.
kbeans -- The number of beans in the gourd. A value of 8 seems suitable,
kdamp -- The damping value of the shaker. Values of 0.98 to 1 seems suitable, with 0.99 a reasonable default.
ktimes -- Number of times shaken.
![]() |
Note |
---|---|
The argument knum was redundant, so it was removed in version 3.49. |
Here is an example of the shaker opcode. It uses the files shaker.orc and shaker.sco.
Example 348. Example of the shaker opcode.
/* shaker.orc */ ; Initialize the global variables. sr = 22050 kr = 2205 ksmps = 10 nchnls = 1 ; Instrument #1 instr 1 a1 shaker 10000, 440, 8, 0.999, 100, 0 out a1 endin /* shaker.orc */
/* shaker.sco */ i 1 0 1 e /* shaker.sco */