<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="./docbook-complete.css" type="text/css"?>
<book>
  <title>Sabagen Users Guide</title>
  <chapter>
    <title>General Use</title>
    <sect1>
      <title>Running Sabagen</title>
      <para>First make sure the sbagen executable is installed somewhere in your path, a good choice would be /usr/local/bin.</para>
      <para>Next at the command prompt type sbagen. you should see the help information.</para>
      <itemizedlist>
	<listitem>
	  <para>sbagen [options] seq-file - This tells you to type sbagen and replace the brackets with a flag and the name of a sequence file (a premade binaural beat program).</para>
	 </listitem>
	<listitem>
	  <para>bagen [options] -i tone-specs - This tells you to type sbagen and replace the brackets with a flag and user defined parameters for a binaural beat session. </para>
	</listitem>
      </itemizedlist>
 
      <sect2>
	<title>Playing Premade Programs</title>
	<para>sbagen comes with a list of premade binaural beat programs based on standard programs already in existance elsewhere. To see the available programs cd to the sbagen directory (the results of untarring it before installing sbagen) and type ls prog*. This will give you a list of the premade programs. There are also premade perl scripts as well to see them type ls t-* at the command prompt.</para>
	<para>Most programs names somehow describe their contents but to fully understand how each one works you must open them in your favorite text editor, VIM or EMACS and read the full descriptions provided.</para>
	<para>Many of the programs are set to be played at specific clock times, you can modify this when you run the programs from the command line by adding option flags as described below:(not all are explained here)</para>
	<itemizedlist>
	  <listitem>
	    <para>	<command> r</command> This options lets you tweak the output rate for your system the default is 44100hz cd quality</para>
	  </listitem>
	  <listitem>
	    <para>q - stands for quickly which need to be followed by a multiple time, (-q 100 would play it 100 times faster) to play a program right away use -q 1 (which will play it right away at normal speed ignoring any clock time settings in the program.</para></listitem>

	  <listitem>
	    <para>-s - Stands for start, this is the same as -q 1. It tells sbagen to ignore any instructions in the program to be run at a specific clock time later. Some programs will play throughout the night while you sleep.</para> </listitem>

	  <listitem>
	    <para>clock time - By specifying a clock time after the program name you can tell it to start playing at a specific clock time.</para></listitem>
	</itemizedlist>
	 </sect2>
      <sect2>
	<title>Interactive mode via command line</title>
	<para>You can control sbagen from the command line to create binaural beat sessions to your needs. To create your session type sbagen -i (or other flag) and the session details as follow.
</para>

	<para>A binaural beat session can be built a number of ways,the sound that we hear is called the "carrier" tone because it carries the beats. The carrier tone can be pink noise; pink, or specific sound frequencies, this is best from 100 -1000hz., or wave files, such as a recording of an instrument playing a pitch which is between 100 -1000hz.</para>
	<para>The binaural part of the session is created by feeding a seperate signal to each side of a stereo picture. Different pitches are sent to each ear, one slightly higher than the other. The difference between the pitches creates beats of that frequency (beats per minute/second). For more information on binaural beats see the sbagen.txt file or look up binaural beats on the internet.</para>

	<para>The session will begin at a certain time, last a certain amount of time and end at a certain time. As well the binaural beat session may change frequency (the carrier or of the beats). If the frequency changes there should be banks (gradual transitions between frequencies).
</para>

	<para>To recap, the program can be built as follow:</para>
	<itemizedlist>
	  <listitem>carrier tone - noise, a tone, a wave file\
	  </listitem>
	  <listitem>binaural beats - a number corresponding to a brain wave state which is specifies a different pitch for each ear.
	  </listitem>
	  <listitem>Timing details - begining, ending, and transitions.
	  </listitem>
	</itemizedlist>
	<sect3>
	  <title>Specifying the carrier</title>
	  <para>To specify the carrier either type "pink" for noise, a pitch frequency (500hz) or wave forms(experimental).<example>
	      <title>for example</title>
	      <para><command>sbagen -i pink</command>his will make the carrier tone pink noise, or </para>
	    For exampl</example><command>sbagen -i 500</command>this will generate  carrier tone with a pitch of 500hz. </para>
	</sect3>
	<sect3>
	  <title>Specifying the binaural beats</title>
	  <para>To specify the binaural beats to our carrier tone do as follows</para>
	  <example>
	    <title>Creating Binaural Beats</title>
	    <para>Type at the prompt: <command>sbagen -i pink 100+7</command>his specifies pink noise with an additional carrier tone of 100 hz with beat frequency of 7hz  </para>
	  </example>
	  <para>You should at this point add amplitude information to your session at this point as follows:
	    <command>
sbagen -i pink/20 100+7/50</command>Volume is calculated on a scale of 0-100, zero being silence and 100 being the loudest without clipping(distortion). </para>
	  <para>To add a carrier tone of 500 hz with an amplitude of 30 and beats of 12 hz type the following

	    <command>sbagen -i 500+12/30 </command>500 is the carrier whith beats of 12 and volume of 30.</para>
	  <para>Finally lets try dual binaural beats (a chord) as follows:<command> sbagen -i 220+12/20 440+12/30</command>This has two tones, one of 220 hz, with beats of 12 and volume of 20 and a second one with a pitch of 440hz with beats of 12 and a volume of 30. </para>
	  <para>Finally the plus sign the plus + sign can be replaced with the minus sign to exchange ears. (to switch which ears is fed the higher pitch and which receives the lower pitch. Try this to hear the difference.(easier to hear with headphones)<command>sbagen -i 500-12/30</command> or <command>sbagen -i 500+12/30</command></para>
	</sect3>
      </sect2>
    </sect1>
    <sect1>
      <title>Creating Custom Programs and Scripts</title>
    </sect1>
  </chapter>
</book>

<!-- 
Local Variables:
mode: xae
sgml-indent-step: 2
sgml-indent-data: t
sgml-set-face: t
sgml-insert-missing-element-comment: nil
End:
--> 
