<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [

<!-- Process this file with docbook-to-man to generate an nroff manual
     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
     less'.  A typical entry in a Makefile or Makefile.am is:

manpage.1: manpage.sgml
	docbook-to-man $< > $@

    
	The docbook-to-man binary is found in the docbook-to-man package.
	Please remember that if you create the nroff version in one of the
	debian/rules file targets (such as build), you will need to include
	docbook-to-man in your Build-Depends control field.

  -->

  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
  <!ENTITY dhfirstname "<firstname>Szabolcs</firstname>">
  <!ENTITY dhsurname   "<surname>Székelyi</surname>">
  <!-- Please adjust the date whenever revising the manpage. -->
  <!ENTITY dhdate      "<date>Oct 5, 2022</date>">
  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
       allowed: see man(7), man(1). -->
  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
  <!ENTITY dhemail     "<email>cc@mail.3d.hu</email>">
  <!ENTITY dhusername  "Székelyi Szabolcs">
  <!ENTITY dhucpackage "<refentrytitle>RUBBERBAND</refentrytitle>">
  <!ENTITY dhpackage   "rubberband">

  <!ENTITY debian      "<productname>Debian</productname>">
  <!ENTITY gnu         "<acronym>GNU</acronym>">
  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
]>

<refentry>
  <refentryinfo>
    <address>
      &dhemail;
    </address>
    <author>
      &dhfirstname;
      &dhsurname;
    </author>
    <copyright>
      <year>2008</year>
      <holder>&dhusername;</holder>
    </copyright>
    &dhdate;
  </refentryinfo>
  <refmeta>
    &dhucpackage;

    &dhsection;
  </refmeta>
  <refnamediv>
    <refname>rubberband</refname>

    <refpurpose>an audio time-stretching and pitch-shifting utility program</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dhpackage;</command>

      <arg><option><replaceable>options</replaceable></option></arg>
      <arg><option><replaceable>input file</replaceable></option></arg>
      <arg><option><replaceable>output file</replaceable></option></arg>

    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>

    <para>This manual page documents briefly the
      <command>&dhpackage;</command> command.</para>

    <para>Rubber Band is a program that permits you to change the
          tempo and pitch of an audio recording independently of one
          another.</para>

  </refsect1>
  <refsect1>
    <title>OPTIONS</title>

    <para>These programs follow the usual &gnu; command line syntax,
      with long options starting with two dashes (`--').  A summary of
      options is included below.</para>

    <para>You must specify at least one of the following time and
      pitch ratio options.</para>

    <variablelist>
      <varlistentry>
        <term><option>-t</option>, <option>--time</option> <replaceable>X</replaceable></term>
        <listitem>
          <para>Stretch to <replaceable>X</replaceable> times original duration, or</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-T</option>, <option>--tempo</option> <replaceable>X</replaceable></term>
        <listitem>
          <para>Change tempo by multiple <replaceable>X</replaceable> (equivalent to --time 1/X), or</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-T</option>, <option>--tempo</option> <replaceable>X</replaceable>:<replaceable>Y</replaceable></term>
        <listitem>
          <para>Change tempo from <replaceable>X</replaceable> to <replaceable>Y</replaceable> (same as --time X/Y), or</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-D</option>, <option>--duration</option> <replaceable>X</replaceable></term>
        <listitem>
          <para>Stretch or squash to make output file <replaceable>X</replaceable> seconds long</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-p</option>, <option>--pitch</option> <replaceable>X</replaceable></term>
        <listitem>
          <para>Raise pitch by <replaceable>X</replaceable> semitones, or</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-f</option>, <option>--frequency</option> <replaceable>X</replaceable></term>
        <listitem>
          <para>Change frequency by multiple <replaceable>X</replaceable></para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>The following options provide ways of making the time and frequency ratios
	change during the audio:</para>

    <variablelist>
      <varlistentry>
	<term><option>-M</option>, <option>--timemap</option> <replaceable>F</replaceable></term>
	<listitem>
	  <para>Use file F as the source for time map</para>
	</listitem>
      </varlistentry>

      <para>A time map (or key-frame map) file contains a series of lines, each with two
	sample frame numbers separated by a single space. These are source and
	target frames for fixed time points within the audio data, defining a varying
	stretch factor through the audio. When supplying a time map you must specify
	an overall stretch factor using -t, -T, or -D as well, to determine the
	total output duration.</para>

      <varlistentry>
	<term>    <option>--pitchmap</option> <replaceable>F</replaceable></term>
	<listitem>
	  <para>Use file F as the source for pitch map</para>
	</listitem>
      </varlistentry>

      <para>A pitch map file contains a series of lines, each with two values: the input
	sample frame number and a pitch offset in semitones, separated by a single
	space. These specify a varying pitch factor through the audio. The offsets
	are all relative to an initial offset specified by the pitch or frequency
	option, or relative to no shift if neither was specified. Offsets are
	not cumulative. This option implies realtime mode (-R) and also enables a
	high-consistency pitch shifting mode, appropriate for dynamic pitch changes.
	Because of the use of realtime mode, the overall duration will not be exact.</para>

      <varlistentry>
	<term>    <option>--freqmap</option> <replaceable>F</replaceable></term>
	<listitem>
	  <para>Use file F as the source for freq map</para>
	</listitem>
      </varlistentry>
      
      <para>A frequency map file is like a pitch map, except that its second column
	lists frequency multipliers rather than pitch offsets (like the difference
	between pitch and frequency options above)</para>
 
      <para>The following options affect the sound manipulation and quality</para>

      <varlistentry>
	<term><option>-2</option>, <option>--fast</option></term>
	<listitem>
	  <para>Use the R2 (faster) engine</para>
	</listitem>
      </varlistentry>

      <para>This is the default (for backward compatibility) when this tool is invoked
	as "rubberband". It was the only engine available in versions prior to v3.0.</para>

      <varlistentry>
	<term><option>-3</option>, <option>--fine</option></term>
	<listitem>
	  <para>Use the R3 (finer) engine</para>
	</listitem>
      </varlistentry>

      <para>This is the default when this tool is invoked as "rubberband-r3". It almost
	always produces better results than the R2 engine, but with significantly
	higher CPU load.</para>

      <varlistentry>
	<term><option>-F</option>, <option>--formant</option></term>
	<listitem>
	  <para>Enable formant preservation when pitch shifting</para>
	</listitem>
      </varlistentry>

      <para>This option attempts to keep the formant envelope unchanged when changing
	the pitch, retaining the original timbre of vocals and instruments in a
	recognisable way.</para>

      <varlistentry>
	<term><option>-c</option>, <option>--crisp</option> <replaceable>N</replaceable></term>
	<listitem>
	  <para>Crispness (N = 0,1,2,3,4,5); default 4 (see below)</para>
	</listitem>
      </varlistentry>

      <para>This option only has an effect when using the R2 (faster) engine. See below
	for details of the different levels.</para>
    </variablelist>

    <para>The remaining options fine-tune the processing mode and stretch algorithm.
	The default is to use none of these options.
	The options marked (2) currently only have an effect when using the R2 engine
	(see -2, -3 options above).</para>

    <variablelist>
      <varlistentry>
	<term><option>-R</option>, <option>--realtime</option></term>
	<listitem>
	  <para>Select realtime mode (implies --no-threads).
		This utility does not do realtime stream processing;
		the option merely selects realtime mode for the
		stretcher it uses</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--no-threads</option></term>
	<listitem>
	  <para>No extra threads regardless of CPU and channel count (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--threads</option></term>
	<listitem>
	  <para>Assume multi-CPU even if only one CPU is identified (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--no-transients</option></term>
	<listitem>
	  <para>Disable phase resynchronisation at transients (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--bl-transients</option></term>
	<listitem>
	  <para>Band-limit phase resync to extreme frequencies (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--no-lamination</option></term>
	<listitem>
	  <para>Disable phase lamination (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--smoothing</option></term>
	<listitem>
	  <para>Apply window presum and time-domain smoothing (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--detector-perc</option></term>
	<listitem>
	  <para>Use percussive transient detector (as in pre-1.5) (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--detector-soft</option></term>
	<listitem>
	  <para>Use soft transient detector (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--window-long</option></term>
	<listitem>
	  <para>Use longer processing window (actual size may vary) (R2)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--window-short</option></term>
	<listitem>
	  <para>Use shorter processing window (with the R3 engine
		this is effectively a quick "draft mode")</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--pitch-hq</option></term>
	<listitem>
	  <para>In RT mode, use a slower, higher quality pitch shift</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--centre-focus</option></term>
	<listitem>
	  <para>reserve focus of centre material in stereo
		(at a cost in width and individual channel quality)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>--ignore-clipping</option></term>
	<listitem>
	  <para>Ignore clipping at output; the default is to restart
		with reduced gain if clipping occurs</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-L</option>, <option>--loose </option></term>
	<listitem>
	  <para>[Accepted for compatibility but ignored; always off]</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-P</option>, <option>---precise </option></term>
	<listitem>
	  <para>[Accepted for compatibility but ignored; always on]</para>
	</listitem>
      </varlistentry>
      <varlistentry>
      <varlistentry>
	<term><option>-d</option>, <option>--debug</option> <replaceable>N</replaceable></term>
	<listitem>
	  <para>Select debug level (N = 0,1,2,3); default 0, full 3
            (N.B. debug level 3 includes audible ticks in output)</para>
	</listitem>
      </varlistentry>
    </variablelist>      

    <para>The following options are for output control and administration:</para>

    <variablelist>      
      <varlistentry>
	<term><option>-q</option>, <option>--quiet</option></term>
	<listitem>
	  <para>Suppress progress output</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-V</option>, <option>--version</option></term>
	<listitem>
	  <para>Show version number and exit</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-h</option>, <option>--help</option></term>
	<listitem>
	  <para>Show the normal help output</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-H</option>, <option>--full-help</option></term>
	<listitem>
	  <para>Show the full help output</para>
	</listitem>
      </varlistentry>
    </variablelist>

    <para>&quot;Crispness&quot; levels:</para>

    <variablelist>
      <varlistentry>
	<term>0</term>
	<listitem>
	  <para>equivalent to --no-transients --no-lamination --window-long</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>1</term>
	<listitem>
	  <para>equivalent to --detector-soft --no-lamination --window-long (for piano)</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>2</term>
	<listitem>
	  <para>equivalent to --no-transients --no-lamination</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>3</term>
	<listitem>
	  <para>equivalent to --no-transients</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>4</term>
	<listitem>
	  <para>equivalent to --bl-transients</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>5</term>
	<listitem>
	  <para>default processing options</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term>6</term>
	<listitem>
	  <para>equivalent to --no-lamination --window-short (may be good for drums)</para>
	</listitem>
      </varlistentry>
    </variablelist>

  </refsect1>
  <refsect1>
    <title>AUTHOR</title>

    <para>Rubber Band was written by Chris Cannam &lt;cannam@all-day-breakfast.com&gt;.</para>

    <para>This manual page was written by &dhusername; &lt;&dhemail;&gt; and
      revised in October 2022 by Dennis Braun &lt;snd@y0o.de&gt; for
      the &debian; system (but may be used by others), because the
      original program does not have a manual page.  Permission is
      granted to copy, distribute and/or modify this document under
      the terms of the &gnu; General Public License, Version 2 any
      later version published by the Free Software Foundation.</para>

    <para>On Debian systems, the complete text of the GNU General
      Public License can be found in
      /usr/share/common-licenses/GPL.</para>

  </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->


