| 1 |
<refentry id="metrobpm"> |
| 2 |
<indexterm id="IndexMetrobpm"><primary>metrobpm</primary></indexterm> |
| 3 |
<refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo> |
| 4 |
<refmeta> |
| 5 |
<refentrytitle>metrobpm</refentrytitle> |
| 6 |
</refmeta> |
| 7 |
|
| 8 |
<refnamediv> |
| 9 |
<refname>metrobpm</refname> |
| 10 |
<refpurpose> |
| 11 |
Trigger Metronome with optional gate |
| 12 |
</refpurpose> |
| 13 |
</refnamediv> |
| 14 |
|
| 15 |
<refsect1> |
| 16 |
<title>Description</title> |
| 17 |
<para> |
| 18 |
Generate a metronomic signal to be used in any circumstance an isochronous trigger is needed. |
| 19 |
</para> |
| 20 |
</refsect1> |
| 21 |
<refsect1> |
| 22 |
<title>Syntax</title> |
| 23 |
<synopsis>ktrig <command>metrobpm</command> kfreq [, initphase] [, kgate]</synopsis> |
| 24 |
</refsect1> |
| 25 |
|
| 26 |
<refsect1> |
| 27 |
<title>Initialization</title> |
| 28 |
<para> |
| 29 |
<emphasis>initphase</emphasis> - initial phase value (in the 0 to 1 range) |
| 30 |
</para> |
| 31 |
</refsect1> |
| 32 |
|
| 33 |
<refsect1> |
| 34 |
<title>Performance</title> |
| 35 |
<para> |
| 36 |
<emphasis>ktrig</emphasis> - output trigger signal |
| 37 |
</para> |
| 38 |
<para> |
| 39 |
<emphasis>kfreq</emphasis> - frequency of trigger bangs in beats per minute |
| 40 |
</para> |
| 41 |
<para> |
| 42 |
<emphasis>kgate</emphasis> - proportion of the cycle that the |
| 43 |
trigger held at one |
| 44 |
</para> |
| 45 |
<para> |
| 46 |
<emphasis>metrobpm</emphasis> is a simple opcode that outputs a |
| 47 |
sequence of isochronous bangs with optional holdin (that is 1 |
| 48 |
values,) each 60/kfreq seconds. |
| 49 |
</para> |
| 50 |
|
| 51 |
<note> |
| 52 |
<para> |
| 53 |
<emphasis>metrobpm</emphasis> will produce a trigger signal of 1 when its phase is exactly 0 or 1. If you want to skip the initial trigger, use a very small value like 0.00000001. |
| 54 |
</para> |
| 55 |
</note> |
| 56 |
</refsect1> |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
<refsect1> |
| 70 |
<title>See also</title> |
| 71 |
<para><link linkend="ControlSensing"><citetitle>Sensing and Control: Tempo and Sequencing</citetitle></link></para> |
| 72 |
</refsect1> |
| 73 |
|
| 74 |
<refsect1> |
| 75 |
<title>Credits</title> |
| 76 |
<para>Written by &namejohn;</para> |
| 77 |
<para>New in Csound 6.17</para> |
| 78 |
</refsect1> |
| 79 |
</refentry> |