| 1 |
j |
| 2 |
|
| 3 |
<refentry id="link_metro"> |
| 4 |
<indexterm id="IndexLinkMetro"><primary>link_metro</primary></indexterm> |
| 5 |
|
| 6 |
<refentryinfo><title>Ableton Link Opcodes</title></refentryinfo> |
| 7 |
<refmeta> |
| 8 |
<refentrytitle>link_metro</refentrytitle> |
| 9 |
</refmeta> |
| 10 |
|
| 11 |
<refnamediv> |
| 12 |
<refname>link_metro</refname> |
| 13 |
<refpurpose> |
| 14 |
Returns a trigger that is 1 on the beat and 0 otherwise along with beat, phase, and time for this session of Ableton Link. |
| 15 |
</refpurpose> |
| 16 |
</refnamediv> |
| 17 |
|
| 18 |
<refsect1> |
| 19 |
<title>Description</title> |
| 20 |
<para>Plugin opcode in ableton_link_opcodes. This opcode is part of the plugin repository and has to be installed separately. |
| 21 |
The plugin repository can be found here: <ulink url="https://github.com/csound/plugins"><citetitle>https://github.com/csound/plugins</citetitle></ulink></para> |
| 22 |
<para> |
| 23 |
Returns a trigger that is 1 on the beat and 0 otherwise along with the beat, phase, and current time of Ableton Link for this session for a given quantum. |
| 24 |
</para> |
| 25 |
</refsect1> |
| 26 |
|
| 27 |
<refsect1> |
| 28 |
<title>Syntax</title> |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
<synopsis>k_trigger, k_beat, k_phase, k_current_time_seconds <command>link_metro</command> i_peer [, k_quantum]</synopsis> |
| 33 |
</refsect1> |
| 34 |
|
| 35 |
<refsect1> |
| 36 |
|
| 37 |
<title>Initialization</title> |
| 38 |
<para> |
| 39 |
<emphasis>i_peer</emphasis> -- The Ableton Link peer object. |
| 40 |
</para> |
| 41 |
</refsect1> |
| 42 |
|
| 43 |
<refsect1> |
| 44 |
<title>Performance</title> |
| 45 |
<para> |
| 46 |
<emphasis>k_trigger</emphasis> -- Trigger, 1 at the instant of the first beat in each local quantum of the beat, and 0 otherwise. |
| 47 |
</para> |
| 48 |
<para> |
| 49 |
<emphasis>k_beat</emphasis> -- The number of the beat, counting from when this peer is enabled. |
| 50 |
</para> |
| 51 |
<para> |
| 52 |
<emphasis>k_phase</emphasis> -- The phase of the beat with respect to the quantum. |
| 53 |
</para> |
| 54 |
<para> |
| 55 |
<emphasis>k_current_time_seconds</emphasis> -- The time of the beat, counting from when this peer is enabled. |
| 56 |
</para> |
| 57 |
<para> |
| 58 |
<emphasis>k_quantum</emphasis> -- The local quantum of the beat, which may be a multiple or fraction of a beat. The default value is 1. |
| 59 |
</para> |
| 60 |
|
| 61 |
<para> |
| 62 |
This opcode permits the use of an Ableton Link session beat to trigger events in Csound. It also can be used to obtain the session time and beat, as well as the phase with respect to the local quantum of the beat. For example, a quantum of 4 can imply 4/4 time, or a quantum of 0.25 will subdivide the beat by 4. |
| 63 |
</para> |
| 64 |
</refsect1> |
| 65 |
|
| 66 |
<refsect1> |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
<title>Examples</title> |
| 71 |
<para> |
| 72 |
Here is an example of the link_metro opcode. It uses the file <ulink url="examples/ableton_link.csd"><citetitle>ableton_link.csd</citetitle></ulink>. |
| 73 |
<example> |
| 74 |
<title>Example of the link_metro opcode.</title> |
| 75 |
<xi:include href="examples-xml/ableton_link.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 76 |
</example> |
| 77 |
</para> |
| 78 |
</refsect1> |
| 79 |
|
| 80 |
<refsect1> |
| 81 |
<title>See also</title> |
| 82 |
<para><link linkend="AbletonLink"><citetitle>Ableton Link Opcodes</citetitle></link></para> |
| 83 |
</refsect1> |
| 84 |
|
| 85 |
<refsect1> |
| 86 |
|
| 87 |
<title>Credits</title> |
| 88 |
<para>By: &namemichael; 2017</para> |
| 89 |
</refsect1> |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
</refentry> |