summaryrefslogtreecommitdiff
path: root/opcodes/shaker.xml
blob: 1a69689f86d8ba6882aeb82a04973b25ecf686c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<refentry id="shaker">
<indexterm id="IndexShaker"><primary>shaker</primary></indexterm>
  <refentryinfo><title>Signal Generators:Models and Emulations</title></refentryinfo>
  <refmeta>
    <refentrytitle>shaker</refentrytitle>
  </refmeta>


 
  <refnamediv>
    <refname>shaker</refname>
    <refpurpose>
      Sounds like the shaking of a maraca or similar gourd instrument.
          </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      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 &nameperry;, but re-coded for Csound.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ares <command>shaker</command> kamp, kfreq, kbeans, kdamp, ktimes [, idecay]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>idecay</emphasis> -- If present indicates for how long at the end of the note the shaker is to be damped. The default value is zero.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      A note is played on a maraca-like instrument, with the arguments as below.
    </para>

    <para>
      <emphasis>kamp</emphasis> -- Amplitude of note.
    </para>

    <para>
      <emphasis>kfreq</emphasis> -- Frequency of note played.
    </para>

    <para>
      <emphasis>kbeans</emphasis> -- The number of beans in the gourd. A value of 8 seems suitable,
    </para>

    <para>
      <emphasis>kdamp</emphasis> -- The damping value of the shaker. Values of 0.98 to 1 seems suitable, with 0.99 a reasonable default.
    </para>

    <para>
      <emphasis>ktimes</emphasis> -- Number of times shaken.
    </para>
 
    <note>
      <title>Note</title>
      <para>
        The argument <emphasis>knum</emphasis> was redundant, so it was removed in version 3.49.
      </para>
    </note>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the shaker opcode. It uses the file <ulink url="examples/shaker.csd"><citetitle>shaker.csd</citetitle></ulink>.

      <example>
        <title>Example of the shaker opcode.</title>

        

        <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
          <xi:include href="examples-xml/shaker.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn; (after &nameperry;)</member>
        <member>University of Bath, Codemist Ltd.</member>
        <member>Bath, UK</member>
      </simplelist>
    </para>

    <para>New in Csound version 3.47</para>
    <para>Fixed the example thanks to a message from &nameistvan;.</para>
  </refsect1>
</refentry>