| 1 | <refentry id="STKShakers"> |
| 2 | <indexterm id="IndexStkshakers"><primary>STKShakers</primary></indexterm> |
| 3 | <refentryinfo><title>Signal Generators:STK Opcodes</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>STKShakers</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>STKShakers</refname> |
| 10 | <refpurpose> |
| 11 | STKShakers is an instrument that simulates environmental sounds or collisions of multiple independent sound producing objects. </refpurpose> |
| 12 | </refnamediv> |
| 13 | |
| 14 | <refsect1> |
| 15 | <title>Description</title> |
| 16 | <para>Plugin opcode in stkopd. This opcode is part of the plugin repository and has to be installed separately. |
| 17 | The plugin repository can be found here: <ulink url="https://github.com/csound/plugins"><citetitle>https://github.com/csound/plugins</citetitle></ulink></para> |
| 18 | <para> |
| 19 | STKShakers are a set of PhISEM and PhOLIES instruments: |
| 20 | PhISEM (Physically Informed Stochastic Event Modeling) is an algorithmic approach for simulating collisions of multiple independent sound producing objects. |
| 21 | It can simulate a Maraca, Sekere, Cabasa, Bamboo Wind Chimes, Water Drops, Tambourine, Sleighbells, and a Guiro. On <ulink url="http://soundlab.cs.princeton.edu/research/controllers/shakers/"></ulink> |
| 22 | PhOLIES (Physically-Oriented Library of Imitated Environmental Sounds) there is a similar approach for the synthesis of environmental sounds. |
| 23 | It simulates of breaking sticks, crunchy snow (or not), a wrench, sandpaper, and more..</para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>asignal <command>STKShakers</command> ifrequency, iamplitude, [kenerg, kv1[, kdecay, kv2[, kshake, kv3[, knum, kv4[, kres, kv5[, kinstr, kv6]]]]]]</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>ifrequency</emphasis> -- Frequency of note played, in Hertz. |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | <emphasis>iamplitude</emphasis> -- Amplitude of note played (range 0-1). |
| 39 | </para> |
| 40 | </refsect1> |
| 41 | |
| 42 | <refsect1> |
| 43 | <title>Performance</title> |
| 44 | <para><emphasis>kenerg</emphasis> -- controller 2, shake energy. Value range of kv1 is 0-127.</para> |
| 45 | <para><emphasis>kdecay</emphasis> -- controller 4, system decay. Value range of kv2 is 0-127.</para> |
| 46 | <para><emphasis>kshake</emphasis> -- controller 128, shake energy. Value range of kv3 is 0-127.</para> |
| 47 | <para><emphasis>knum</emphasis> -- controller 11, number of objects. Value range of kv4 is 0-127.</para> |
| 48 | <para><emphasis>kres</emphasis> -- controller 1, resonance frequency. Value range of kv5 is 0-127.</para> |
| 49 | <para><emphasis>kinstr</emphasis> -- controller 1071, instrument selection (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 = 22). Value range of kv6 is 0-22.</para> |
| 50 | </refsect1> |
| 51 | |
| 52 | <refsect1> |
| 53 | <note> |
| 54 | <title>Note</title> |
| 55 | <para> |
| 56 | The code for this opcode is taken directly from the Shakers class in the Synthesis Toolkit in C++ by Perry R. Cook and Gary P. Scavone. More on the STK classes can be found here: |
| 57 | <ulink url="https://ccrma.stanford.edu/software/stk/classes.html"><citetitle>https://ccrma.stanford.edu/software/stk/classes.html</citetitle></ulink> |
| 58 | </para> |
| 59 | <para> |
| 60 | <emphasis>kc1, kv1, kc2, kv2, kc3, kv3, kc4, kv4, kc5, kv5, kc6, kv6, kc7, kv7, kc8, kv8</emphasis> -- Up to 8 optional k-rate controller pairs for the STK opcodes. |
| 61 | Each controller pair consists of a controller number (kc) followed by a controller value (kv). Both the controller numbers and the controller values are krate variables. However, during a performance, normally the controller numbers stay fixed while the corresponding controller values may change at any time. |
| 62 | The order of the controller pair is arbitrary, as long as they are after <emphasis>iamplitude</emphasis>. Also, it is not needed that all controller pairs are used. |
| 63 | </para> |
| 64 | </note> |
| 65 | </refsect1> |
| 66 | |
| 67 | <refsect1> |
| 68 | <title>Examples</title> |
| 69 | <para> |
| 70 | Here is an example of the STKShakers opcode. It uses the file <ulink url="examples/STKShakers.csd"><citetitle>STKShakerscsd</citetitle></ulink>. |
| 71 | |
| 72 | <example> |
| 73 | <title>Example of the STKShakers opcode.</title> |
| 74 | <xi:include href="examples-xml/STKShakers.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 75 | </example> |
| 76 | </para> |
| 77 | </refsect1> |
| 78 | |
| 79 | <refsect1> |
| 80 | <title>See also</title> |
| 81 | <para><link linkend="STKTop"><citetitle>STK Opcodes</citetitle></link></para> |
| 82 | </refsect1> |
| 83 | |
| 84 | <refsect1> |
| 85 | <title>Credits</title> |
| 86 | <para> |
| 87 | <simplelist> |
| 88 | <member>Author: &namemichael; (after Georg Essl)</member> |
| 89 | <member>Irreducible Productions</member> |
| 90 | <member>New York, NY</member> |
| 91 | </simplelist> |
| 92 | </para> |
| 93 | <para>New in Csound version 5.11</para> |
| 94 | </refsect1> |
| 95 | </refentry> |
| 96 |