shaker

shaker — Sounds like the shaking of a maraca or similar gourd instrument.

Description

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.

Syntax

ares shaker kamp, kfreq, kbeans, kdamp, ktimes [, idecay]

Initialization

idecay -- If present indicates for how long at the end of the note the shaker is to be damped. The default value is zero.

Performance

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] Note

The argument knum was redundant, so it was removed in version 3.49.

Examples

Here is an example of the shaker opcode. It uses the file shaker.csd.

Example 985. Example of the shaker opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in
-odac             ;;;RT audio out
; For Non-realtime ouput leave only the line below:
; -o shaker.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

; by Menno Knevel

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1

knum  =   p5
kfreq	line p4, p3, 440
a1 shaker .5, kfreq, 8, 0.999, knum
outs a1, a1

endin

</CsInstruments>
<CsScore>
;       frq     #
i 1 0 1 440     3
i 1 2 1 440    300
i 1 4 1 440    3000
i 1 6 2 4000    100

</CsScore>
</CsoundSynthesizer>


See Also

Models and Emulations

Credits

Author: John ffitch (after Perry Cook)
University of Bath, Codemist Ltd.
Bath, UK

New in Csound version 3.47