Skip to content

Commit

Permalink
Added pages for elapsedcycles, elapsedtime, eventcycles and eventtime
Browse files Browse the repository at this point in the history
  • Loading branch information
fggp committed Oct 14, 2022
1 parent 1357053 commit 15af5d0
Show file tree
Hide file tree
Showing 4 changed files with 319 additions and 0 deletions.
84 changes: 84 additions & 0 deletions opcodes/elapsedcycles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

<refentry id="elapsedcycles">
<indexterm id="IndexElapsedcycles"><primary>elapsedcycles</primary></indexterm>
<refentryinfo><title>Instrument Control:Time Reading</title></refentryinfo>
<refmeta>
<refentrytitle>elapsedcycles</refentrytitle>
</refmeta>

<refnamediv>
<refname>elapsedcycles</refname>
<refpurpose>
Read absolute time in k-rate cycles.
</refpurpose>
</refnamediv>

<refsect1>
<title>Description</title>
<para>
Read absolute time, in k-rate cycles, since the start of the performance.
</para>
</refsect1>

<refsect1>
<title>Syntax</title>
<synopsis>ires <command>elapsedcycles</command></synopsis>

<synopsis>kres <command>elapsedcycles</command></synopsis>
</refsect1>

<refsect1>
<title>Performance</title>
<para>
<emphasis>elapsedcycles</emphasis> is for time in k-rate cycles. So with:

<informalexample>
<programlisting>
<emphasis role="opc">sr</emphasis> <emphasis role="op">=</emphasis> 44100
<emphasis role="opc">kr</emphasis> <emphasis role="op">=</emphasis> 6300
<emphasis role="opc">ksmps</emphasis> <emphasis role="op">=</emphasis> 7</programlisting>
</informalexample>

then after half a second, the <emphasis>elapsedcycles</emphasis> opcode
would report 3150. It will always report an integer.
</para>

<para>
<emphasis>elapsedcycles</emphasis> can produce a k-rate variable for
output. There are no input parameters.
</para>

<para>
<emphasis>elapsedcycles</emphasis> can also operate only at the start of
the instance of the instrument. It produces an i-rate variable (starting
with <emphasis>i</emphasis> or <emphasis>gi</emphasis>) as its output.
</para>

<note>
<para>
<emphasis>elapsedcycles</emphasis> acts like
<link linkend="timek"><citetitle>timek</citetitle></link> but it
returns the correct values instead of being one cycle late.
</para>
</note>
</refsect1>

<refsect1>
<title>See Also</title>
<para>
<link linkend="eventcycles"><citetitle>eventcycles</citetitle></link>,
<link linkend="eventtime"><citetitle>eventtime</citetitle></link>,
<link linkend="elapsedtime"><citetitle>elapsedtime</citetitle></link>.
</para>
</refsect1>

<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &nameeduardo;</member>
<member>August 2022</member>
</simplelist>
</para>
</refsect1>
</refentry>
75 changes: 75 additions & 0 deletions opcodes/elapsedtime.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

<refentry id="elapsedtime">
<indexterm id="IndexElaosedtime"><primary>elapsedtime</primary></indexterm>
<refentryinfo><title>Instrument Control:Time Reading</title></refentryinfo>
<refmeta>
<refentrytitle>elapsedtime</refentrytitle>
</refmeta>

<refnamediv>
<refname>elapsedtime</refname>
<refpurpose>
Read absolute time in seconds.
</refpurpose>
</refnamediv>

<refsect1>
<title>Description</title>
<para>
Read absolute time, in seconds, since the start of the performance.
</para>
</refsect1>

<refsect1>
<title>Syntax</title>
<synopsis>ires <command>elapsedtime</command></synopsis>

<synopsis>kres <command>elapsedtime</command></synopsis>
</refsect1>

<refsect1>
<title>Performance</title>
<para>
Time in seconds is available with <emphasis>elapsedtime</emphasis>. This
would return 0.5 after half a second.
</para>

<para>
<emphasis>elapsedtime</emphasis> can both produce a k-rate variable for
output. There are no input parameters.
</para>

<para>
<emphasis>elapsedtime</emphasis> can also operate at the start of the
instance of the instrument. It produces an i-rate variable (starting with
<emphasis>i</emphasis> or <emphasis>gi</emphasis>) as its output.
</para>

<note>
<para>
<emphasis>elapsedtime</emphasis> acts like
<link linkend="times"><citetitle>times</citetitle></link> but it
returns the correct values instead of being one cycle late.
</para>
</note>
</refsect1>

<refsect1>
<title>See Also</title>
<para>
<link linkend="eventcycles"><citetitle>eventcycles</citetitle></link>,
<link linkend="eventtime"><citetitle>eventtime</citetitle></link>,
<link linkend="elapsedcycles"><citetitle>elapsedcycles</citetitle></link>.
</para>
</refsect1>

<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &nameeduardo;</member>
<member>August 2022</member>
</simplelist>
</para>
</refsect1>
</refentry>
86 changes: 86 additions & 0 deletions opcodes/eventcycles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

<refentry id="eventcycles">
<indexterm id="IndexEventcycles"><primary>eventcycles</primary></indexterm>
<refentryinfo><title>Instrument Control:Time Reading</title></refentryinfo>
<refmeta>
<refentrytitle>eventcycles</refentrytitle>
</refmeta>

<refnamediv>
<refname>eventcycles</refname>
<refpurpose>
Read absolute time in k-rate cycles.
</refpurpose>
</refnamediv>

<refsect1>
<title>Description</title>
<para>
Read absolute time, in k-rate cycles, since the start of an
instance of an instrument. Called at both i-time as well as
k-time. NB: the returned value at k-time starts at 1
</para>
</refsect1>

<refsect1>
<title>Syntax</title>
<synopsis>kres <command>eventcycles</command></synopsis>
</refsect1>

<refsect1>
<title>Performance</title>
<para>
<emphasis>eventcycles</emphasis> is for time in k-rate cycles. So with:

<informalexample>
<programlisting>
<emphasis role="opc">sr</emphasis> <emphasis role="op">=</emphasis> 44100
<emphasis role="opc">kr</emphasis> <emphasis role="op">=</emphasis> 6300
<emphasis role="opc">ksmps</emphasis> <emphasis role="op">=</emphasis> 7</programlisting>
</informalexample>

then after half a second, the <emphasis>eventcycles</emphasis> opcode would
report 3150. It will always report an integer.
</para>

<para>
<emphasis>eventcycles</emphasis> produces a k-rate variable for output.
There are no input parameters.
</para>

<para>
<emphasis>eventcycles</emphasis> is similar to
<link linkend="elapsedcycles"><citetitle>elapsedcycles</citetitle></link>
except it returns the time since the start of this instance of the
instrument.
</para>

<note>
<para>
<emphasis>eventcycles</emphasis> acts like
<link linkend="timeinstk"><citetitle>timeinstk</citetitle></link> but it
returns the correct values instead of being one cycle late.
</para>
</note>
</refsect1>

<refsect1>
<title>See Also</title>
<para>
<link linkend="eventtime"><citetitle>eventtime</citetitle></link>,
<link linkend="elapsedcycles"><citetitle>elapsedcycles</citetitle></link>,
<link linkend="elapsedtime"><citetitle>elapsedtime</citetitle></link>,
<link linkend="lastcycle"><citetitle>lastcycle</citetitle></link>.
</para>
</refsect1>

<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &nameeduardo;</member>
<member>August 2022</member>
</simplelist>
</para>
</refsect1>
</refentry>
74 changes: 74 additions & 0 deletions opcodes/eventtime.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

<refentry id="eventtime">
<indexterm id="IndexEventtime"><primary>eventtime</primary></indexterm>
<refentryinfo><title>Instrument Control:Time Reading</title></refentryinfo>
<refmeta>
<refentrytitle>eventtime</refentrytitle>
</refmeta>

<refnamediv>
<refname>eventtime</refname>
<refpurpose>
Read absolute time in seconds.
</refpurpose>
</refnamediv>

<refsect1>
<title>Description</title>
<para>
Read absolute time, in seconds, since the start of an instance of an instrument.
</para>
</refsect1>

<refsect1>
<title>Syntax</title>
<synopsis>kres <command>eventtime</command></synopsis>
</refsect1>

<refsect1>
<title>Performance</title>
<para>
Time in seconds is available with <emphasis>eventtime</emphasis>. This
would return 0.5 after half a second.
</para>

<para>
<emphasis>eventtime</emphasis> produces a k-rate variable for output.
There are no input parameters.
</para>

<para>
<emphasis>eventtime</emphasis> is similar to
<link linkend="elapsedtime"><citetitle>elapsedtime</citetitle></link>
except it returns the time since the start of this instance of the
instrument.
</para>

<note>
<para>
<emphasis>eventtime</emphasis> acts like
<link linkend="timeinsts"><citetitle>timeinsts</citetitle></link> but it
returns the correct values instead of being one cycle late.
</para>
</note>
</refsect1>

<refsect1>
<title>See Also</title>
<para>
<link linkend="eventcycles"><citetitle>timeinsts</citetitle></link>,
<link linkend="elapsedcycles"><citetitle>elapsedcycles</citetitle></link>,
<link linkend="elapsedtime"><citetitle>elapsedtime</citetitle></link>.
</para>
</refsect1>

<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &nameeduardo;</member>
<member>August 2022</member>
</simplelist>
</para>
</refsect1>
</refentry>

0 comments on commit 15af5d0

Please sign in to comment.