| 1 | <refentry id="filescal"> |
| 2 | <indexterm id="IndexFilescal"><primary>filescal</primary></indexterm> |
| 3 | <refentryinfo><title>Spectral Processing:Other</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>filescal</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>filescal</refname> |
| 10 | <refpurpose> |
| 11 | Phase-locked vocoder processing with onset detection/processing, 'tempo-scaling'. |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | <emphasis>filescal</emphasis> implements phase-locked vocoder |
| 19 | processing from disk files, resampling if necessary. |
| 20 | </para> |
| 21 | <para> |
| 22 | This opcode allows for time and frequency-independent scaling. Time is advanced internally, but controlled by a tempo scaling parameter; when an onset is detected, timescaling is momentarily stopped to avoid smearing of attacks. The quality of the effect is generally improved with phase locking switched on. |
| 23 | </para> |
| 24 | <para> |
| 25 | <emphasis>filescal</emphasis> will also scale pitch, independently of frequency, using a transposition factor (k-rate). |
| 26 | </para> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Syntax</title> |
| 31 | <synopsis>asig[,asig2] <command>filescal</command> ktimescal, kamp, kpitch, Sfile, klock [,ifftsize, idecim, ithresh] |
| 32 | </synopsis> |
| 33 | </refsect1> |
| 34 | |
| 35 | <refsect1> |
| 36 | <title>Initialization</title> |
| 37 | <para> |
| 38 | <emphasis>Sfile</emphasis> -- source soundfile, mono or stereo |
| 39 | files are allowed, but need to match the number of outputs. |
| 40 | </para> |
| 41 | <para> |
| 42 | <emphasis>ifftsize</emphasis> -- FFT size (power-of-two), defaults to 2048. |
| 43 | </para> |
| 44 | <para> |
| 45 | <emphasis>idecim</emphasis> -- decimation, defaults to 4 (meaning hopsize = fftsize/4) |
| 46 | </para> |
| 47 | <para> |
| 48 | <emphasis>idbthresh</emphasis> -- threshold based on dB power spectrum ratio between two successive windows. A detected ratio above it will cancel timescaling momentarily, to avoid smearing (defaults to 1) |
| 49 | </para> |
| 50 | </refsect1> |
| 51 | |
| 52 | <refsect1> |
| 53 | <title>Performance</title> |
| 54 | <para> |
| 55 | <emphasis>ktimescal</emphasis> -- timescaling ratio, < 1 |
| 56 | stretch, > 1 contract. Non-negative numbers only. |
| 57 | </para> |
| 58 | <para> |
| 59 | <emphasis>kamp</emphasis> -- amplitude scaling |
| 60 | </para> |
| 61 | <para> |
| 62 | <emphasis>kpitch</emphasis> -- grain pitch scaling (1=normal pitch, < 1 lower, > 1 higher; negative, backwards) |
| 63 | </para> |
| 64 | <para> |
| 65 | <emphasis>klock</emphasis> -- switchec phase-locking on |
| 66 | (non-zero) or off (zero). |
| 67 | </para> |
| 68 | |
| 69 | </refsect1> |
| 70 | |
| 71 | <refsect1> |
| 72 | <title>Examples</title> |
| 73 | <para> |
| 74 | Here is an example of the filescal opcode. It uses the file <ulink url="examples/filescal.csd"><citetitle>filescal.csd</citetitle></ulink>. |
| 75 | <example> |
| 76 | <title>Example of the filescal opcode.</title> |
| 77 | <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> |
| 78 | <xi:include href="examples-xml/filescal.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 79 | </example> |
| 80 | </para> |
| 81 | </refsect1> |
| 82 | |
| 83 | <refsect1> |
| 84 | <title>See Also</title> |
| 85 | <para> |
| 86 | <link linkend="SiggenStft"><citetitle>Short-time Fourier Transform (STFT) Resynthesis</citetitle></link> |
| 87 | </para> |
| 88 | </refsect1> |
| 89 | |
| 90 | <refsect1> |
| 91 | <title>Credits</title> |
| 92 | <para> |
| 93 | <simplelist> |
| 94 | <member>Author: &namevictor;</member> |
| 95 | <member>April 2016</member> |
| 96 | </simplelist> |
| 97 | </para> |
| 98 | |
| 99 | <para>New in version 6.07</para> |
| 100 | <para>April 2016.</para> |
| 101 | </refsect1> |
| 102 | </refentry> |
| 103 |