| 1 | |
| 2 | <refentry id="jspline"> |
| 3 | <indexterm id="IndexJspline"><primary>jspline</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Random (Noise) Generators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>jspline</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>jspline</refname> |
| 13 | <refpurpose> |
| 14 | A jitter-spline generator. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | A jitter-spline generator. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ares <command>jspline</command> xamp, kcpsMin, kcpsMax</synopsis> |
| 28 | |
| 29 | <synopsis>kres <command>jspline</command> kamp, kcpsMin, kcpsMax</synopsis> |
| 30 | </refsect1> |
| 31 | |
| 32 | <refsect1> |
| 33 | <title>Performance</title> |
| 34 | <para> |
| 35 | <emphasis>kres, ares</emphasis> -- Output signal |
| 36 | </para> |
| 37 | |
| 38 | <para> |
| 39 | <emphasis>xamp</emphasis> -- Amplitude factor |
| 40 | </para> |
| 41 | |
| 42 | <para> |
| 43 | <emphasis>kcpsMin, kcpsMax</emphasis> -- Range of point-generation rate. Min and max limits are expressed in cps. |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>jspline</emphasis> (jitter-spline generator) generates a smooth curve based on random points generated at [<emphasis>cpsMin</emphasis>, <emphasis>cpsMax</emphasis>] rate. This opcode is similar to <link linkend="randomi"><citetitle>randomi</citetitle></link> or <link linkend="randi"><citetitle>randi</citetitle></link> or <link linkend="jitter"><citetitle>jitter</citetitle></link>, but segments are not straight lines, but cubic spline curves. Output value range is approximately > -<emphasis>xamp</emphasis> and < <emphasis>xamp</emphasis>. Actually, real range could be a bit greater, because of interpolating curves beetween each pair of random-points. |
| 48 | </para> |
| 49 | |
| 50 | <para> |
| 51 | At present time generated curves are quite smooth when <emphasis>cpsMin</emphasis> is not too different from <emphasis>cpsMax</emphasis>. When <emphasis>cpsMin</emphasis>-<emphasis>cpsMax</emphasis> interval is big, some little discontinuity could occurr, but it should not be a problem, in most cases. Maybe the algorithm will be improved in next versions. |
| 52 | </para> |
| 53 | |
| 54 | <para> |
| 55 | These opcodes are often better than <link linkend="jitter"><citetitle>jitter</citetitle></link> when user wants to <quote>naturalize</quote> or <quote>analogize</quote> digital sounds. They could be used also in algorithmic composition, to generate smooth random melodic lines when used together with <link linkend="samphold"><citetitle>samphold</citetitle></link> opcode. |
| 56 | </para> |
| 57 | |
| 58 | <para> |
| 59 | Note that the result is quite different from the one obtained by filtering white noise, and they allow the user to obtain a much more precise control. |
| 60 | </para> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>Examples</title> |
| 65 | <para> |
| 66 | Here is an example of the jspline opcode. It uses the file <ulink url="examples/jspline.csd"><citetitle>jspline.csd</citetitle></ulink>. |
| 67 | <example> |
| 68 | <title>Example of the jspline opcode.</title> |
| 69 | <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> |
| 70 | <xi:include href="examples-xml/jspline.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 71 | </example> |
| 72 | </para> |
| 73 | </refsect1> |
| 74 | |
| 75 | <refsect1> |
| 76 | <title>See also</title> |
| 77 | <para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para> |
| 78 | </refsect1> |
| 79 | |
| 80 | <refsect1> |
| 81 | <title>Credits</title> |
| 82 | <para>Author: &namegabriel;</para> |
| 83 | <para>New in Version 4.15</para> |
| 84 | </refsect1> |
| 85 | </refentry> |