home *** CD-ROM | disk | FTP | other *** search
/ Sound Sensations! / sound_sensations.iso / misc / srs / srs.man < prev    next >
Encoding:
Text File  |  1991-09-18  |  51.2 KB  |  1,662 lines

  1. The SRS User Manual
  2.  
  3. The Shark Sound Recording Studio Program
  4.  
  5.  
  6. SRS Requirements
  7.  
  8. The program requires:
  9.  
  10.     312K RAM
  11.     200K Disk Space
  12.     DOS 3.0+
  13.  
  14. The play/record features require:
  15.  
  16.     MediaVision Pro Audio Spectrum Sound 
  17.     or
  18.     any Sound Board supporting .wav files
  19.  
  20. The display feature requires:
  21.  
  22.     16 color Graphics System
  23.  
  24. The dual monitor feature requires:
  25.  
  26.     16 color Graphics System 
  27.     and monochrome monitor
  28.  
  29.  
  30. Qualifications
  31.  
  32. This program is not for sale and is free from gross defect.  
  33. It is offerred as advertisement for itself and other Shark programs.
  34.  
  35. In particular, this DOS version of SRS is an advertisement for the 
  36. MultiMedia Windows version of SRS.
  37.  
  38.  
  39. SRS Installation
  40.  
  41. You can set up SRS in your system in three ways:
  42.  
  43.     keep srs.exe in the srs directory 
  44.  
  45.         this requires that you change to this directory to
  46.         use the program
  47.  
  48.     keep srs.exe in the srs directory but put it in your PATH
  49.  
  50.         this allows you to run srs from any directory, but
  51.         putting a whole directory in your PATH to refer to
  52.         only one program is wasteful, or even impossible on
  53.         systems with lengthy PATH's.
  54.  
  55.     put srs.exe in a PATH directory, 
  56.     put "set srsopts=-P path" in autoexec.bat
  57.  
  58.         -P "path" option tells srs where to look for its files.
  59.         this allows you to run srs from any directory but
  60.         doesn't add to your PATH length or the DOS search time, 
  61.         and allows srs to locate its files.  
  62.  
  63. The last method is suggested.  When you want to "run" a script, if
  64. it is not found in the current directory, then srs looks for it in
  65. its startup directory, or the directory specified with -P.  These
  66. steps are followed by srs when using its "srsplay" and "srsrec" batch
  67. files, too.
  68.  
  69.  
  70. SRS Operation
  71.  
  72. The program starts by performing several initializations, each of the
  73. later overriding any in the former, the first being the setting default 
  74. values, then reading the user's current environment state, executing the 
  75. script "config.srs" in the current directory, and finally parsing the 
  76. command line.  If -noinit is specified, then the environment and the 
  77. "config.srs" file are skipped, but the command line which is always 
  78. processed.
  79.  
  80. Thereafter, it issues the command prompt, accepts and process a line of 
  81. input, and reissues the prompt, until "exit" is entered or EOF is read.
  82. This allows you to run srs in normal or redirected mode:
  83.  
  84.     > srs
  85.     Yes? exit
  86.     > srs < commands.srs > commands.out
  87.  
  88. The program will not overwrite or delete an existing file, unless 
  89. the file was created during the current srs session, and only if the 
  90. file is marked for writing.  The "record" action is different in this
  91. respect, though, as it will overwrite "readonly" buffers;  it will not
  92. overwrite existing files that are not in the buffer list.
  93.  
  94.     It is possible to have srs overwrite an existing file
  95.     by referring to the file using the $N, $I, or $O 
  96.     variables (see "Sound Buffer Names").
  97.  
  98.     Should a "holdover" file prevent an operation, use 
  99.     the Shark "rm" program (or the DOS "erase" command") to 
  100.     remove the offending file, and then repeat the action.
  101.  
  102.     A quick method of overcoming this obstacle is illustrated:
  103.  
  104.     > srs
  105.     Yes? reverse sound.wav into x
  106.         dointo() error: name not in buffers but exists!
  107.     Yes? rm x; !!
  108.     rm x; reverse carcass.wav into x
  109.     Yes?
  110.  
  111.     In this example, the attempt to reverse the sound.wav buffer
  112.     into the buffer x failed because the file x existed on the
  113.     disk and was not in the buffer list.  So, the "rm" program
  114.     (or the DOS "erase" program) was used to remove the file "x",
  115.     and the "!!" command (which executes the last command) was
  116.     used to repeat the action (see "History of Commands" below).
  117.  
  118.  
  119. Command Lines
  120.  
  121. A command line consists of a set of phrases.  Specifically, phrases 
  122. specifying a "source" buffer, a "target" buffer, and an "action".
  123.  
  124. The ";" character is considered a "newline" when no "whitespace" 
  125. preceeds it.
  126.  
  127.     This is treated as three commands: load, play and stat:
  128.  
  129.         ? load from destruct.wav; play; stat
  130.  
  131.     Allowing "whitespace" before the semicolon inhibits this
  132.     substitution, allowing the ";" to be passed along to DOS,
  133.     as it has meaning to other SHARK programs.
  134.  
  135.     The beginning of the line is considered to be non-whitespace.
  136.  
  137. The "#" character causes the rest of the line to be ignored as comment.
  138.  
  139.     This allows scripts to be commented:
  140.  
  141.     ? type echo10cs.scr
  142.     # echo1s.scr - adds 10cs echo of loaded file into "$N.echo"
  143.     cut from $N at 00 csecs into $N.echo    # first sound into 
  144.     add from $N at 10 csecs into $O        # first echo, .1 second in
  145.     add from $N at 20 csecs into $O        # second echo, .2 seconds in
  146.     add from $N at 30 csecs into $O        # second echo, .3 seconds in
  147.  
  148.     This implies that the "#" character can not be used in a 
  149.     buffer name.
  150.  
  151.  
  152. Command Phrasing
  153.  
  154. There are three phrases for most actions: from, into, and action.
  155.  
  156. The phrases can be specified in any order.  Input is processed up to 
  157. the end of line after an action has been specified, at which time the 
  158. action function is called.  
  159.  
  160. The "from" phrase is sufficient to create a buffer (the "input" buffer), 
  161. from a file, and so, this phrase is enough to load the specific .wav 
  162. file, "sound.wav":
  163.  
  164.     ? sound.wav
  165.  
  166.     The file is now loaded and ready for use.
  167.  
  168. The "from" phrase will accept "wildcards", much like DOS but with 
  169. additional pattern-matching styles:
  170.  
  171.     ? *.wav
  172.  
  173.     This pattern matches any buffer or file with ".wav" in its name
  174.     and srs will then load each one.
  175.  
  176. You can also specify a "buffer number" (reported by "stat", the number
  177. in the far left column) for the "from" buffer.
  178.  
  179.     Be aware, though, that SRS searches for the actual name
  180.     first, and if a buffer with the name of the number you 
  181.     specify exists, it will be found first:
  182.  
  183.         ? load *.wav
  184.         ? stat
  185.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  186.            1  screech.wav  ....        r  c:\tools\srs\screech.wav
  187.            2  imtired.wav  ....        r  c:\tools\srs\imtired.wav
  188.         ? play 1
  189.         ? load 1 into 2
  190.         ? stat
  191.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  192.            1  screech.wav  ....        r  c:\tools\srs\screech.wav
  193.            2  imtired.wav  ....        r  c:\tools\srs\imtired.wav
  194.            3  2            ....        r  c:\tools\srs\7
  195.  
  196.         Specifying a number that is not a valid entry in the
  197.         buffer table causes the number to be treated like any
  198.         other unrecognized word.
  199.  
  200.         The "into" phrase does not accept numbers as entries
  201.         in the list of buffers, nor does it process wildcards
  202.         (it does process $variables, though).  It treats its
  203.         argument as the actual name you desire.  Thus "into 7"
  204.         creates a buffer named "7".
  205.         
  206.     Important to remember is that SRS searches the disk for files 
  207.     ONLY when it can not find an already-loaded buffer with the 
  208.     pattern or number you specified.
  209.  
  210.     So, if you first load "sound.wav" from disk, and then try to
  211.     load "*.wav", SRS will not load any additional files from disk
  212.     because "*.wav" matched "sound.wav":
  213.  
  214.         ? load sound.wav
  215.         ? stat
  216.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  217.         ? load *.wav
  218.         ? stat
  219.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  220.  
  221.     However, you can tell SRS to search the directory by prefixing
  222.     the pattern with ".\";  that is, ".\*.wav" will tell SRS, in
  223.     essence, to get the *.wav files from the current directory.  We
  224.     say "in essence" because SRS does not treat this specially;  it
  225.     simply does not find that pattern in its "known-buffer" list,
  226.     and so searches the disk.
  227.  
  228.         Users familiar with DOS directory stuff will 
  229.         recognize that the dot, ".", refers to the 
  230.         "current" directory, and so dot-slash-pattern 
  231.         refers to files in the current directory with 
  232.         the specified pattern.
  233.  
  234.     So, to load one .wav file, then decide to load them all:
  235.  
  236.         ? load sound.wav
  237.         ? stat
  238.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  239.         ? load .\*.wav
  240.         ? stat
  241.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  242.            1  screech.wav  ....        r  c:\tools\srs\screech.wav
  243.            2  imtired.wav  ....        r  c:\tools\srs\imtired.wav
  244.  
  245.     The pattern matching facility with the "from" phrase can be 
  246.     used to reference a number of buffer-names to set up a list
  247.     of names, and yet another "from" name, using this syntax:
  248.  
  249.         ? stat
  250.            0  src          ....        r  c:\tools\srs\src
  251.            1  src.1        ....        r  c:\tools\srs\src.1
  252.            2  src.2        ....        r  c:\tools\srs\src.2
  253.            3  src.3        ....        r  c:\tools\srs\src.3
  254.         ? from src.* into sub.$I:e sub from src
  255.         ? stat
  256.            0  src          ....        r  c:\tools\srs\src
  257.            1  src.1        ....        r  c:\tools\srs\src.1
  258.            2  src.2        ....        r  c:\tools\srs\src.2
  259.            3  src.3        ....        r  c:\tools\srs\src.3
  260.            4  sub.1        ....        r  c:\tools\srs\sub.1
  261.            5  sub.2        ....        r  c:\tools\srs\sub.2
  262.            6  sub.3        ....        r  c:\tools\srs\sub.3
  263.     
  264.         This syntax used "from src.*" to build a series of
  265.         repetitions (src.1, src.2, src.3) and "into sub.$I:e"
  266.         to generate output names (sub.1, sub.2, sub.3), then
  267.         the action "sub" followed by the buffer to use as the
  268.         "subtraction" source (src), and expanded to this:
  269.  
  270.         from src.1 into sub.1 sub from destruct.wav
  271.         from src.1 into sub.1 sub from destruct.wav
  272.         from src.1 into sub.1 sub from destruct.wav
  273.  
  274.         The second "from" simply overwrote the first "from"
  275.         since "from" does little except reference a buffer.
  276.  
  277.             As an aside, this feature was "discovered"
  278.             by a shark when trying to accomplish a series
  279.             of subtracts using a single "source" buffer;
  280.             because the "into" phrase does not accept
  281.             patterns, this odd syntax is required.
  282.  
  283.         So, you can do even more than that:
  284.  
  285.         ? from src.* into add.$I:e add from sub.*
  286.  
  287.         You run out of files, though, with some of these
  288.         actions, so append "save" to the command line to
  289.         prevent the temporary files from being removed.
  290.  
  291.     This last example is rather confusing, but shows the 
  292.     flexibility of the command interpreter and the power of the 
  293.     pattern-matching facility.  It is with this in mind that we 
  294.     state with confidence that there is no substitute for the 
  295.     command-line, except for the simplest of actions, especially 
  296.     when this feature was not known to the designers!
  297.  
  298. The "into" phrase allows you to rename the sound buffer as it is loaded,
  299. usually to simplify typing:
  300.  
  301.         ? load sound.wav into s
  302.         ? stat
  303.            0  s           ....        r  c:\tools\srs\sound.wav
  304.  
  305.     From now on, the buffer "s" refers to the file "sound.wav".
  306.     Using this, you can load the same file a number of times into
  307.     different names:
  308.  
  309.         ? load sound.wav into s1
  310.         ? load sound.wav into s2
  311.         ? load sound.wav into s3
  312.         ? stat
  313.            0  s1       ....        r  c:\tools\srs\sound.wav
  314.            1  s2       ....        r  c:\tools\srs\sound.wav
  315.            2  s3       ....        r  c:\tools\srs\sound.wav
  316.  
  317. Alternatively, you do not need to specify the name, in which case SRS 
  318. supplies a default name, either the filename or the name found in the 
  319. file for "load", or "t###" for other operations:
  320.  
  321.         ? load sound.wav 
  322.         ? stat
  323.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  324.         ? cut sound.wav
  325.         ? stat
  326.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  327.            1  t001         ....        r  c:\tools\srs\sound.wav
  328.  
  329. The arranging of default names allows you to specify a series of actions
  330. without indicating the buffer names, and so the t### name suffices for
  331. many operations:
  332.  
  333.         ? load sound.wav        # $N= sound.wav
  334.         ? cut                # $I= sound.wav $O= t001
  335.         ? reverse            # $I= t001 $O= t002
  336.         ? play                # $I= t002 $O= t003
  337.         ? display            # $I= t003 $O= t004
  338.         ? load into output.wav        # $I= t004 $O= output.wav
  339.         ? del t0*            # remove intermediates
  340.  
  341.     There is a problem with this, though, and that is "what if you
  342.     want to load a number of files (using a pattern) into different
  343.     names?".  There is no simple way of doing this in one command,
  344.     unless the desired output name can be somehow "made" from the 
  345.     "input" anme, and the program does give you reference to current 
  346.     "action, the last "load-name" and current "input-name" and 
  347.     "output-name", as well as some internal variables:
  348.  
  349.         $N    = name of last buffer "loaded"
  350.         $I    = name of current input buffer
  351.         $O    = name of current output buffer
  352.         $C    = current CHANNELS
  353.         $T    = current THRESHOLD
  354.         $R    = current SAMPLERATE
  355.         $A    = current "action"
  356.  
  357.     You can modify these variables using any number of these strings 
  358.     appended to the variable string:
  359.  
  360.         :e    = extension
  361.         :r    = name without extension
  362.  
  363.         :l    = name to lower-case
  364.         :u    = name to upper-case
  365.  
  366.         :0    = zero characters of name
  367.         :1    = one character of name
  368.         :2    = two characters of name
  369.         ...
  370.         :9    = nine characters of name
  371.  
  372.     An example:
  373.  
  374.         ? cut destruct.wav
  375.  
  376.         $I         = destruct.wav
  377.  
  378.         $I:1        = d        # 1 char
  379.         $I:2        = de        # 2 char
  380.         $I:e        = wav        # extension
  381.         $I:1.$I:e    = d.wav        # 1 char, "." and extension 
  382.         $I:e:1        = w        # extension, 1 char of
  383.         $I:e:2        = wa        # extension, 2 chars of
  384.         $I:r        = destruct    # name, no extension
  385.         $I:r.$A        = destruct.cut    # name, no ext, "." action
  386.  
  387.     This allows you to process multiple files in one fell swoop,
  388.     yet still give them reasonable names:
  389.  
  390.         ? set channels to 2
  391.         ? cut *.wav into $I:r.2    both    # convert *.wav into *.2
  392.                         # .2 files are now stereo
  393.         ? pan *.2 into $I:r.l2r        # .l2r are left-to-right pans
  394.         ? swap *.l2r into $I:r.r2l    # .r2l are right-to-left pans
  395.  
  396.         ? stat
  397.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  398.            1  screech.wav  ....        r  c:\tools\srs\screech.wav
  399.            2  imtired.wav  ....        r  c:\tools\srs\imtired.wav
  400.            3  sound.2      ....        r  c:\tools\srs\sound.2  
  401.            4  screech.2    ....        r  c:\tools\srs\screech.2  
  402.            5  imtired.2    ....        r  c:\tools\srs\imtired.2  
  403.            6  sound.l2r    ....        r  c:\tools\srs\sound.l2r
  404.            7  screech.l2r  ....        r  c:\tools\srs\screech.l2r
  405.            8  imtired.l2r  ....        r  c:\tools\srs\imtired.l2r
  406.            9  sound.r2l    ....        r  c:\tools\srs\sound.r2l
  407.           10  screech.r2l  ....        r  c:\tools\srs\screech.r2l
  408.           11  imtired.r2l  ....        r  c:\tools\srs\imtired.r2l
  409.         
  410.     The "into" phrase does not process patterns or buffer numbers.
  411.     The designers felt that it was too dangerous to use patterns 
  412.     with "into", as a failure to match a name in the buffer table 
  413.     might not fail to match a DOS file, which could be terrible:
  414.  
  415.         ? stat
  416.            0  sound.wav    ....        r  c:\tools\srs\sound.wav
  417.            1  screech.wav  ....        r  c:\tools\srs\screech.wav
  418.            2  imtired.wav  ....        r  c:\tools\srs\imtired.wav
  419.         ? insert from sound.wav into c*.*
  420.  
  421.             OOPS!  No buffers named c*.*! If you happened 
  422.             to be in the root directory and "command.com"
  423.             was present, well, inserting sound.wav into 
  424.             that file would have troublesome side-effects.
  425.  
  426.         So, no pattern matching processing is done with the
  427.         "into" buffer, however, there is a way to specify
  428.         a pattern of "into" names:
  429.  
  430.         ? from s*.wav into $I from sound.wav action
  431.  
  432.         This translates into "into s*.wav from sound.wav action".
  433.  
  434.         NOTE: this bypasses the safety checks that SRS uses to
  435.         prevent overwriting existing DOS files, and defeats the
  436.         reason why pattern-matching is not done on the "into"
  437.         phrase!  But, if you get to the point that you are 
  438.         using this feature, then you probably don't need to be
  439.         told to be careful using patterns and to work in 
  440.         directories that hold sound files only!
  441.  
  442.  
  443. Command Syntax
  444.  
  445. The syntax for the command line mode is:
  446.  
  447.     from      "buffer" {at ###} {for ###} {left OR right}
  448.     into     "buffer" {at ###} {for ###} {left OR right}
  449.     action    
  450.  
  451.     Because these can be entered in any order, all of the 
  452.     following are valid:
  453.  
  454.         ? load destruct.wav into x
  455.         ? into x load destruct.wav
  456.         ? from destruct.wav into x load
  457.         ? into x from destruct.wav load
  458.  
  459.     Commands need not be completely specified per line:
  460.  
  461.         ? from destruct.wav
  462.         ? into x
  463.         ? load
  464.  
  465.         ? into x
  466.         ? destruct.wav
  467.         ? load
  468.  
  469.     The key is:
  470.  
  471.         before the action requested can be executed properly,
  472.         the "from" and "into" clauses must have been specified
  473.         (if required).
  474.  
  475. Additional or different syntaxes exist for other commands:
  476.  
  477.     set     "variable" {to ###} 
  478.     amp    by ###
  479.     ren    "buffer" to "newname"
  480.     run    "script"
  481.  
  482. Known Words
  483.  
  484. Buffer Related Words
  485.  
  486. These words specify or qualify the relevant sound buffers:
  487.  
  488.     from    source buffer
  489.  
  490.         this name must be known either in the buffer table
  491.         or in the current directory.
  492.  
  493.         ? from destruct.wav
  494.         ? from *.wav
  495.  
  496.         This phrase can be used in a command line more than
  497.         once:
  498.  
  499.         ? from src.* into $I sub from src
  500.  
  501.         This syntax allows you to use the $I to reference
  502.         src.*, but the second "from" allows the "sub" action
  503.         to use a different source.
  504.  
  505.         In effect, the "from src.* into $I" is treated as
  506.         though you used "into src.*", which is not 
  507.         understood by the program.
  508.  
  509.         This allows you to use patterns for the "into" phrase
  510.         since it does not do so itself.
  511.  
  512.     into    target buffer
  513.  
  514.         ? into x.x.x.x.x
  515.  
  516.         this name need not be known and will be created if
  517.         it doesn't.  If it does exist in the buffer table,
  518.         it must not be marked "read-only";  if it does not
  519.         exist in the buffer table, then it must not exist
  520.         in the current directory, as srs will not overwrite
  521.         existing files that it did not create in the current
  522.         session.
  523.  
  524.         Both of these words will recognize the $N, $I and $O
  525.         variables (see "Sound Buffer Names") to simplify and
  526.         regulate the naming of buffers.
  527.  
  528.         ? from $N into $N:r.1    # from last "loaded" buffer
  529.                     # into "name.1"
  530.         ? from $O into $I:r.2    # from last "output" buffer
  531.                     # into "name.2"
  532.  
  533.     at    start position in buffer
  534.  
  535.         this word is followed by either a number
  536.         specifying the start position, or the word
  537.         "mark" followed by a number specifying which
  538.         mark to use from the mark list (marks are
  539.         added during "play" (the 'm' key) and are
  540.         displayed during "stat" under the buffer
  541.         with which they are associated.
  542.  
  543.         > from x at 1000
  544.         > from x at mark 0
  545.  
  546.         The syntax "action mark N" is a shorthand method
  547.         for "action from mark.file at mark.offset";  that
  548.         is, "mark" is a synonym for "from XXX at NNN",
  549.         where XXX is the buffer specified by the particular
  550.         mark and NNN is it's associated offset.
  551.  
  552.     for    length of buffer
  553.  
  554.         this word is followed by a number specifying
  555.         the length of the buffer in question.
  556.  
  557.         > into x for 10000 
  558.  
  559.     upto    end of buffer
  560.  
  561.         this word indicates that the value specified is
  562.         to be used as the address of the end of the buffer,
  563.         and so the size, or "for" value, is then calculated 
  564.         by subtracting from this the offset, or "at", value.
  565.  
  566.         This word can be used with "mark", similar to "for".
  567.  
  568.         After playing and marking a buffer, the command:
  569.  
  570.         "cut mark 0 upto mark 1" will grab the section so
  571.         marked into a temporary buffer.  
  572.  
  573.     secs    multiply value by samplerate
  574.     csecs    multiply value by samplerate/ 100
  575.     left    left channel of stereo buffer
  576.     right    right channel of stereo buffer
  577.  
  578.         > from x at 10 csecs        # 10 1/100 seconds
  579.         > into y for 5 secs        # 5 seconds
  580.         > into y left            # left channel of y
  581.  
  582. An example of fully qualifying the buffers:
  583.  
  584.     ? from x at mark 0 for 10 secs into y left at 10000 for rest 
  585.  
  586.  
  587. Action Words
  588.  
  589. The "help" actions simply lists the available actions:
  590.  
  591.     help    list available actions and other words
  592.  
  593.  
  594.  
  595. These actions operate on the internal sound buffers:
  596.  
  597.     play    play from buffer
  598.     record    record into buffer
  599.  
  600.         ? play from destruct.wav
  601.         ? play *.wav
  602.         ? record into memo337.wav
  603.  
  604.         during record, the program calculates
  605.         a pause time based on the requested 
  606.         buffer size, and watches for any 
  607.         keypress, which terminates recording.
  608.  
  609.         during play, the program pauses for
  610.         a time calculated by the size of the
  611.         buffer and the samplerate and channels,
  612.         and monitors the keyboard.  The following 
  613.         keys cause certain actions to occur:
  614.  
  615.         Affect Play
  616.  
  617.             ESC    stop
  618.             space    restart 
  619.             p    pause/unpause
  620.             l    loop back "threshold" eighth-seconds
  621.             L    loop to start upon completion
  622.         
  623.         Affect Samplerate
  624.  
  625.             s    -1
  626.             S    -10
  627.             CTRL-S    -100
  628.             f    +1
  629.             F    +10
  630.             CTRL-F    +100
  631.             R    enter new samplerate
  632.  
  633.         Affect Channels
  634.  
  635.             c    +1
  636.             C    -1
  637.  
  638.         Add Marks
  639.  
  640.             m    add mark to list
  641.  
  642.         Miscellaneous
  643.  
  644.             !    system("command")
  645.  
  646.         The sound programs offered by vendors of sound-boards
  647.         will probably not support playing from a specified
  648.         offset into or for a specified length of the sound
  649.         file.  So, when attempting to play a "shadowed"
  650.         buffer, or from a buffer in a "library", you must
  651.         "play into" another buffer.  Alas and alack, 'tis true.
  652.  
  653.     load    load buffer into new buffer using input channels
  654.  
  655.         This command simply replaces existing buffer entries
  656.         or creates new entries with the specified "from" name.
  657.  
  658.         The "load" command is so basic that it can occur by
  659.         simply specifying the "from" name.  The following are
  660.         are equivalent:
  661.  
  662.         ? destruct.wav
  663.         ? from destruct.wav
  664.         ? load destruct.wav
  665.         ? load from destruct.wav
  666.         ? load from destruct.wav into destruct.wav
  667.  
  668.     cut    load buffer into new buffer using current channels
  669.  
  670.         Similar to the load command, "cut" is different in
  671.         the following ways:
  672.  
  673.         it performs "channel adjusting"
  674.  
  675.             if the channel numbers differ, the output
  676.             buffer is "multiplied" or "divided" as required
  677.  
  678.         it performs "buffer-size adjusting"
  679.  
  680.             if replacing an existing buffer, the size of 
  681.             the buffer remains the same, unless the input
  682.             size is smaller, in which case the smaller
  683.             size results.  
  684.  
  685.     blend    using stereo buffers, load left channel into left channel 
  686.  
  687.         This command will load the left channel of one stereo
  688.         buffer into the left channel of the stereo output buffer.
  689.  
  690.         This command will operate on non-stereo buffers, as
  691.         it simply takes every other byte from the input buffer
  692.         and copies it into every other byte of the output buffer.
  693.  
  694.     insert    insert buffer into buffer
  695.  
  696.         This command enlarges (or creates) the output buffer
  697.         and places the insert buffer at the specified point:
  698.  
  699.         ? from src.wav at 1 secs for 5 secs 
  700.         ? into dest.wav at 10 secs
  701.         ? insert
  702.  
  703.     shadow    point buffer to another buffer's file
  704.  
  705.         This action is interesting.  Using it, you can refer
  706.         to an existing buffer (and its file) with completely
  707.         different parameters: offset, size, channels, and 
  708.         samplerate.  Actions using this buffer use those
  709.         parameters, and not the parameters of the buffer
  710.         being shadowed:
  711.  
  712.         ? load destruct.wav        # 1 channel, 11025 rate
  713.         ? set channels to 2
  714.         ? set samplerate to 5512    
  715.         ? shadow destruct.wav into d.1    # 2 channels, 5512 rate
  716.  
  717.         Operations will then treat the file "destruct.wav" as
  718.         though it had the parameters associated with "d.1"
  719.         when using "d.1" as the input buffer.
  720.  
  721.         This action also allows you to set up different "views"
  722.         into the shadowed buffer, as specified by the "at" and
  723.         "for" phrases:
  724.  
  725.         ? shadow from destruct.wav at 1 secs for 5 secs into d.2
  726.  
  727.         This is most useful for buffers being shadowed that are
  728.         writable, allowing you to modify that buffer "underneath
  729.         the nose of the buffer shadowing it":
  730.  
  731.         ? load destruct.wav into src
  732.         ? load src            # set up $N= src
  733.         ? run shadow.001        # script to set up shadows:
  734.             shadow from $N at 0 into $N.0
  735.             shadow from $N at 1 into $N.1
  736.             ...            
  737.         ? from src.* into p.$I:e cut     # cut src.1 into ph.1 ...
  738.         ? from p.* into $I sub from src # from each p.* into each one,
  739.                         # sub "src".  
  740.                         # guitar "phase" effect
  741.                         # in effect, subtract the src
  742.                         # buffer into the ph.? buffer
  743.                         # where ph.? is a different
  744.                         # offset into the src buffer
  745.         ? play p.*
  746.         ? save from p.7 into destruct.p7# save the one you like
  747.         ? del p.*
  748.  
  749.         ? load kaboom.wav into src    # src.* now refer to "kaboom"
  750.         ? from src.* into p.$I:e cut    # cut kaboom at offsets
  751.         ? from p.* into $I sub from src    # same as above
  752.         ? play p.*            
  753.  
  754.  
  755.         ? load *.wav
  756.         ? blend s into t
  757.         ? insert a into b ; insert a into b 
  758.         ? shadow from main.wav at 5 secs for 5 secs into t2
  759.  
  760.         ? load d.wav         # channels = 1, samplerate = 11025
  761.         ? set channels to 4    # channels * 4
  762.         ? set samplerate to 44100    # samplerate * 4
  763.         ? cut d.wav into d.4    # quadruple samples
  764.         ? avg d.4 into avg.d.4    # smooth out curves
  765.         
  766.  
  767.     stat    display buffer and file status
  768.  
  769.         this will display all buffers, unless there is a 
  770.         current input buffer:
  771.  
  772.         ? stat            # status of all buffers
  773.         ? stat buffer        # status of "buffer"
  774.         ? stat *.0        # status of buffers matching pattern
  775.  
  776.         The output pauses after a screenful, and stops if no
  777.         key is pressed (or ESC is pressed) after 2 seconds.
  778.  
  779.     save    mark buffer to not modify or delete file
  780.  
  781.         Saves the current input buffer, to the current output
  782.         buffer if specified.  This command follows the same rules
  783.         regarding overwriting exising files not created during
  784.         the current SRS session, or those created and already
  785.         saved.
  786.  
  787.         ? save sound.0 into sound.wav
  788.         ? save src.*
  789.         ? from src.* into destruct.$I:e save
  790.  
  791.     del    remove buffer, and file if not read-only
  792.  
  793.         this command will accept wildcards:
  794.  
  795.         ? del *            # same as "clear"
  796.         ? del *.1.*        # remove buffers with ".1." in name
  797.  
  798.     clear    delete all buffers and non-read-only files
  799.  
  800.         ? stat .\*.wav
  801.         ? save from stereo into newwave.wav
  802.         ? delete des*.wav
  803.         ? clear
  804.  
  805.         You can perform an action and save the result like so:
  806.  
  807.         ? cut x into y save
  808.  
  809.         This is useful when processing multiple buffers by
  810.         using the pattern matching facilities and the internal
  811.         "naming" variables:
  812.  
  813.         ? cut *.wav into $I:r.2 save
  814.  
  815.             This syntax will, for each *.wav:
  816.  
  817.             cut file1.wav into file1.2
  818.             save file1.2
  819.  
  820.     add    add one buffer to existing buffer
  821.     sub    subtract buffer from existing buffer
  822.  
  823.         These function add each of the samples together
  824.         of the from and into buffers and store the result
  825.         into the into buffer.  The data is interpreted as 
  826.         being valued according to the PCM logic:
  827.  
  828.             silence  : 0x80
  829.             positive : 0x81 to 0xFF
  830.             negative : 0x7F to 0x00
  831.  
  832.         ? load destruct.wav into d+c
  833.         ? add carcass.wav into d+c
  834.         ? sub carcass.wav into d+c-c
  835.  
  836.         ? fc /b carcass.wav d+c-c
  837.         fc: no differences encountered
  838.  
  839.             at this point, d+c-c should contain the
  840.             same sound data as destruct.wav, but
  841.             note that if these arithmetic operations 
  842.             overflow the 8-bit data size the value is
  843.             set to the maximum (0 or -1), and so d+c-c
  844.             will not equal destruct.wav if the original
  845.             addition exceeded the allowable range.
  846.  
  847.     fadeup    linear fade sound up   
  848.     fadedn    linear fade sound down 
  849.     amp    increase volume by factor
  850.     damp    decrease volume by factor
  851.  
  852.         ? fadeup src.l into src.l.u
  853.         ? fadedn src.l into src.l.d
  854.         ? amp src.l.u into src.l.u.5 by 50
  855.         ? damp src.l.d into src.l.d.5 by 50
  856.  
  857.     display    graphic of sound buffer, "threshold" (max 8) rows
  858.  
  859.         The output will pause for 1 second upon completion 
  860.         of one screen of display if a key was pressed 
  861.         during the draw, unless the key was ESC, in which 
  862.         case the display routine exits.
  863.  
  864.         When the display routine exits, the program 
  865.         pauses for 1 second, unless ESC was pressed.
  866.  
  867.     avg    average hi/lo buffer values over "threshold" units
  868.     chop    make buffer silent below "threshold"
  869.     pan    linear pan left to right stereo channels
  870.     swap    swap left and right stereo channels
  871.     reverse    reverse sound buffer
  872.  
  873.         ? display 
  874.         ? avg from m into m.avg
  875.         ? chop from m into m.chop
  876.         ? pan from s into s.pan
  877.         ? swap from s into s.swap
  878.         ? reverse from m into m.reverse
  879.  
  880.  
  881.     dadd    decimal add 
  882.     dsub    decimal subtract 
  883.  
  884.         these actions treat each buffer    as a binary number.  
  885.         Normal actions convert the data byte to an internal 
  886.         format for processing.
  887.  
  888.         Instead, the data from each buffer is simply added 
  889.         (or subtracted) and generated-carry's are propogated 
  890.         down the line.
  891.  
  892.         The functions are reciprocal:
  893.  
  894.         ? load into org
  895.  
  896.         ? load into added
  897.         ? dadd org into added
  898.  
  899.         ? load into subed
  900.         ? dsub org into subed
  901.  
  902.         ? fc /b org subed
  903.         fc: no differences encountered
  904.  
  905.         The operation is performed in reverse-buffer order
  906.         so as to treat each buffer as a single number.  If 
  907.         a carry occurs in the first byte of data (from the
  908.         operations performed from the last byte forward),
  909.         this information is lost!.
  910.  
  911.         It was decided to include these functions since 
  912.         the results are virtually impossible to obtain using 
  913.         any other program, although the practicality of 
  914.         adding binary numbers that are thousands, even 
  915.         millions of digits long, seems to escape us.
  916.  
  917.             However, the fact that no practical
  918.             purpose has yet been determined does
  919.             not translate into a reason to not 
  920.             include such a feature.  As sharks,
  921.             we'll eat rubber tires if the fancy
  922.             strikes us.
  923.  
  924. The "set" command modifies internal variables:
  925.  
  926.     Variable Name    Short    Meaning
  927.  
  928.     samplerate    sa    set samplerate 
  929.     channels    ch    set number of channels
  930.     filter        fi    set PAS filter
  931.     threshold    th    set value used by certain actions
  932.     filemode    fm    set read/write on buffer
  933.     debug            debugging messages
  934.     bequiet            no prompting or status messages
  935.     usemono            use monochrome monitor after display
  936.     dohistory        save command lines in history.srs
  937.     interactive        menu system
  938.     prompt            SRS command prompt
  939.  
  940.     The syntax for this command is similar to the DOS "set"
  941.     command:
  942.  
  943.         set variable=value
  944.  
  945.     It has an additional syntax that ignores whitespace:
  946.  
  947.         set variable to value
  948.  
  949.     ? set
  950.  
  951.         This will display the values of all variables
  952.  
  953.     ? set debug
  954.  
  955.         This will set if debug is not set, unset otherwise
  956.  
  957.     ? set debug to 0
  958.     ? set debug to 1
  959.  
  960.         This will unset (0), or set (1), the variable
  961.  
  962.     ? stat
  963.        0  destruct.wav    .....         r c:\tools\srs\destruct.wav
  964.  
  965.     An additional syntax is available to the set command, wherein
  966.     the specified variable is applied to a buffer (and not the system):
  967.  
  968.     ? from destruct.wav set filemode to w 
  969.     ? stat
  970.        0  destruct.wav    .....         w c:\tools\srs\destruct.wav
  971.     ? into destruct.wav set fm
  972.     ? stat
  973.        0  destruct.wav    .....         r c:\tools\srs\destruct.wav
  974.  
  975.  
  976.     The prompt can include the DOS prompt metacharacters and 
  977.     SRS internal variables using the '$' strings:
  978.  
  979.         $#    current command number
  980.         $q    double-quote character
  981.         $$    dollar-sign character
  982.         $l    greater-than character
  983.         $l    less-than character
  984.         $b    pipe character
  985.         $t    time string
  986.         $d    date string
  987.         $p    current directory
  988.         $n    current drive letter
  989.         $v    SRS copyright
  990.         $I    last input name
  991.         $O    last output name
  992.         $N    last "load" name
  993.         $_    newline
  994.         $e    escape character
  995.         $h    backspace character
  996.  
  997.     This implentation includes the ability to set and access 
  998.     "user" variables, however, it is not fully functional.
  999.  
  1000.     When setting an unknown variable, the variable and the value
  1001.     are stored in the variable list, which can be accessed in 
  1002.     the command line or scripts using the following format:
  1003.  
  1004.         ? set if=source.wav        # ${if} and ${of} are
  1005.         ? set of=target.wav        # referred to in the
  1006.         ? run process.scr         # script
  1007.  
  1008.     There is 1024 bytes of user variable space, and when this
  1009.     overwraps, previous values will be overwritten.  This feature
  1010.     was added late and is unfortunately incomplete.
  1011.  
  1012. The "ren" command will change the name associated with a buffer, but
  1013. not the DOS filename:
  1014.  
  1015.     ren "buffer" to "newname"
  1016.  
  1017.     ? load destruct.wav
  1018.     ? stat
  1019.        0  destruct.wav    .....         r c:\tools\srs\destruct.wav
  1020.  
  1021.     ? ren destruct.wav to d
  1022.     ? stat
  1023.        0  d         .....         r c:\tools\srs\destruct.wav
  1024.  
  1025.     ? L destruct.wav
  1026.     ? S
  1027.        0  d         .....         r c:\tools\srs\destruct.wav
  1028.        1  destruct.wav    .....         r c:\tools\srs\destruct.wav
  1029.  
  1030.     ? ren to e
  1031.     ? S
  1032.        0  d         .....         r c:\tools\srs\destruct.wav
  1033.        1  e         .....         r c:\tools\srs\destruct.wav
  1034.  
  1035. These words affect internal variables for specific actions:
  1036.  
  1037.     by    "value"
  1038.     to    "word" or "value"
  1039.  
  1040.         ? amp by 100 
  1041.         ? rename to t0
  1042.         ? set debug to 0
  1043.  
  1044. The "history" action lists the history of commands
  1045.  
  1046.     history    list commands entered during session
  1047.  
  1048.         This command can be referred to by a single "!"
  1049.  
  1050.         ? history
  1051.         ? !
  1052.  
  1053.         The output is a list of the most recently used 
  1054.         commands.  This list is available to the user to
  1055.         retrieve, modify, and execute (see "History of 
  1056.         Commands" below).
  1057.  
  1058. The "exit" command causes the program to shutdown.  The program removes
  1059. all temporary files that were not "saved".
  1060.  
  1061.  
  1062. The "mixer" allows access to the onboard mixer on the PAS.  (Not available 
  1063. in the advertisement version).  Note that because SRS passes unknown 
  1064. commands to DOS, you have access to the "pas" program and its commands:
  1065.  
  1066.     > srs
  1067.     Yes? pas set volume to 75
  1068.     
  1069. The "run" command executes a file containing commands.  This allows you
  1070. to build new commands using the existing set of commands to provide
  1071. additional functionality not previously envisioned by the designers or
  1072. not included due to time or space considerations.
  1073.  
  1074.         ? run panr2l        # read commands from panl2r
  1075.  
  1076.     To read a script prior to exection:
  1077.  
  1078.         ? type panr2l
  1079.         pan             # pan does left to right
  1080.         swap            # this makes right to left
  1081.         del            # delete output from pan
  1082.  
  1083.     Run a script from the command line
  1084.  
  1085.         > srs L destruct.wav; run panl2r; save into destruct.l2r
  1086.  
  1087.     Scripts can refer to the variable $N which stores the name of
  1088.     the last buffer "loaded":
  1089.  
  1090.         ? type panr2l.2
  1091.         pan            # pan does left to right
  1092.         swap into $N:r.l2r    # swap into "load-file-name"".l2r"
  1093.         del            # delete output from pan
  1094.         ? load destruct.wav    # $N= destruct.wav
  1095.         ? run panr2l.2        # the script generates a file
  1096.         ? stat destruct.r2l    # $N.r2l= destruct.r2l
  1097.  
  1098.     Scripts can be used for building a "master" from a series of
  1099.     "cuts", although you will probably need paper and pencil to
  1100.     make notes on buffer offsets and lengths, unless you are using
  1101.     Windows or something like Sidekick.
  1102.  
  1103.     The best purpose for scripts is to provide actions that are
  1104.     not included internal to SRS.  We hope that the basics are
  1105.     covered, although the point has been made that "pan" could
  1106.     accept an argument as to the direction;  however, it is hoped
  1107.     that shortcomings in this area can be made up for using the
  1108.     script feature.
  1109.     
  1110.  
  1111. Sound Buffer Names
  1112.  
  1113. Buffers are named using up to 15 characters.  Case is not significant.  
  1114. This name is used as the sound file name, unless this name is invalid, 
  1115. in which case the name F#### is used, #### being a number that is 
  1116. consecutively incremented if the directory entry exists.
  1117.  
  1118. Buffers can be referred to using variables so as to automate the
  1119. processing of large numbers of files:
  1120.  
  1121.     $N    = last name used during "load"
  1122.     $I    = current or last input name
  1123.     $O    = current or last output name
  1124.     $C    = current CHANNELS value
  1125.     $R    = current SAMPLERATE value
  1126.     $T    = current THRESHOLD value
  1127.  
  1128.     These variables can be modified using the "fe" syntax:
  1129.  
  1130.         :r    - remove extension
  1131.         :e    - retrieve extension
  1132.         :d    - retrieve drive letter
  1133.  
  1134.         :l    - string to lowercase
  1135.         :u    - string to uppercase
  1136.  
  1137.         (see "fe" under "Support Progams" in "srs.doc" 
  1138.         for a complete list of modifiers, however, 
  1139.         these other modifiers have no effect since 
  1140.         buffers do not include path elements)
  1141.  
  1142.     These variables can be embedded in strings.  The text
  1143.     is copied, the variable substituted and modified, and
  1144.     remaining text copied:
  1145.  
  1146.  
  1147.         Examples
  1148.  
  1149.         $I         = destruct.wav
  1150.  
  1151.         $I:r        = destruct
  1152.         $I:r.2        = destruct.2
  1153.         X_$I:r        = X_destruct
  1154.         new$I:e        = new.wav
  1155.  
  1156.     ? load destruct.wav into $I:r    # output buffer name= destruct
  1157.  
  1158.     ? load mono.slb            # load library of mono sounds
  1159.     ? set channels to 2        # prepare to make stereo library
  1160.  
  1161.     ? cut * into $I:r.2 both save    # cut (both channels) and save
  1162.  
  1163.     ? cat -b *.2 > stereo.slb    # put all sounds into library
  1164.     ? clear                # clear the buffer list
  1165.     ? load stereo.slb        # load new library of stereo sounds
  1166.     
  1167.     When a buffer is requested, this substitution is performed,
  1168.     which occurs late in the execution procedure.
  1169.  
  1170.         Because of this, it is possible to overwrite 
  1171.         existing files (normally, srs will overwrite 
  1172.         only files it created during the current session 
  1173.         and only those not yet saved).
  1174.  
  1175.         ? stat
  1176.            0  destruct.wav    30720    r  c:\tools\srs\destruct.wav
  1177.            1  destruct.1      10000    w  c:\tools\srs\destruct.1
  1178.         ? cut destruct.1 into destruct.wav     # fails
  1179.         ? cut destruct.1 into $I:r.wav        # succeeds
  1180.         ? stat
  1181.            0  destruct.wav    10000    r  c:\tools\srs\destruct.wav
  1182.            1  destruct.1      10000    w  c:\tools\srs\destruct.1
  1183.  
  1184.  
  1185. History of Commands
  1186.  
  1187.     The history list can be manipulated on the command line
  1188.     in a manner that will be familiar to C-shell users.
  1189.  
  1190.     History is accessed in the command line with the "!"
  1191.     character.  
  1192.  
  1193.         As an input line is read, characters are
  1194.         copied to the command line until a "!" is found.
  1195.  
  1196.         The following character patterns refer to:
  1197.  
  1198.             !!    the last command
  1199.             !n    the command number "n"
  1200.             !-n    the "n"th to last command (!-1 == !!)
  1201.             !frag    the command starting with "frag"
  1202.             !$    the last argument from the last command
  1203.             !#    the current command line up to before !#
  1204.             !:    nothing 
  1205.  
  1206.         History references can be followed by qualifiers 
  1207.         that specify a word or words:
  1208.  
  1209.             :n    refer to word number n 
  1210.             :$    refer to the last word
  1211.             :*    refer to words from 1 to last
  1212.  
  1213.             :n-m    refer to words from n to m
  1214.             :n-*    refer to words from n to one before last
  1215.             :n-$    refer to words from n to last (!!:0-$ == !!)
  1216.  
  1217.         Appending a history reference with ":p" causes the
  1218.         display of the translated command and causes execution 
  1219.         of the command to be skipped:
  1220.  
  1221.             :p    only print the new command line
  1222.  
  1223.         Appending a history reference with any of the following
  1224.         specifies a certain modification to the retrieved command:
  1225.  
  1226.             :r    remove last ".ext" 
  1227.             :h    remove last "file.ext" 
  1228.             :t    leave last "file.ext" 
  1229.             :d    leave "drive:" at beginning
  1230.             :l    translate to lower case
  1231.             :u    translate to upper case
  1232.             :s/x/y/    substitute y for first x
  1233.             :g/x/y/    substitute y for all x
  1234.  
  1235.  
  1236.         ? !!    # the last command
  1237.         ? !7    # the 7th command
  1238.         ? !-3    # the 3rd to last command
  1239.         ? !add    # the last command that started with the word "add"
  1240.  
  1241.     An example of the way that this simplifies command line 
  1242.     interaction:
  1243.  
  1244.         ? add from source.wav into target.wav at 00
  1245.         ? !!:0-* 10
  1246.         ? !!:s/10/20
  1247.         ? !!:s/2/3/
  1248.         
  1249. Examples:
  1250.  
  1251. ? load destruct.wav into !@$.%^&*
  1252. ? stat
  1253. BUF Buf Name    Offset Length  Ch  Rate   Mode    File Name    
  1254.   0 destruct.wav     0  30720  1   11025  r    c:\tools\srs\destruct.wav    
  1255.   1 !@$.%^&*         0  30720  1   11025  w    c:\tools\srs\F002        
  1256.  
  1257. Sound Buffers can also be referred to using a set of special characters:
  1258.  
  1259.     load *.wav
  1260.     del d*.wav
  1261.     stat *.?.?.*
  1262.     play *.1 
  1263.  
  1264. The program searches its internal buffer list first when attempting 
  1265. to locate a sound, before searching the current directory.  If you
  1266. wish to use the pattern-matching facility, be aware of this.  An
  1267. example will illustrate:
  1268.  
  1269. load *.wav
  1270. stat
  1271.     
  1272.   0 destruc0.wav     0  30720  1   11025  r c:\tools\srs\destruc0.wav
  1273.   1 destruct.wav     0  30720  1   11025  r c:\tools\srs\destruct.wav
  1274.  
  1275. cd wav
  1276. load *.wav
  1277. stat
  1278.  
  1279.   0 destruc0.wav     0  30720  1   11025  r c:\tools\srs\destruc0.wav
  1280.   1 destruct.wav     0  30720  1   11025  r c:\tools\srs\destruct.wav
  1281.  
  1282. --- the "load *.wav" failed to load additional files because the ---
  1283. --- pattern *.wav matched entries in the internal buffer list ------
  1284.  
  1285. load .\*.wav
  1286. stat
  1287.   0 destruc0.wav     0  30720  1   11025  r c:\tools\srs\destruc0.wav
  1288.   1 destruct.wav     0  30720  1   11025  r c:\tools\srs\destruct.wav
  1289.   2 fakinit.wav      0 459264  1   11025  r c:\tools\srs\wav\fakinit.wav
  1290.   3 satbo.wav        0 311808  1   11025  r c:\tools\srs\wav\satbo.wav
  1291.  
  1292. --- the "load .\*.wav" loaded additional files because of the ".\" ---
  1293. --- prefix (current directory) which indicates to search the disk ---- 
  1294.  
  1295. --- The following set of four examples show different methods of ---
  1296. --- achieving the same result  ---
  1297.  
  1298.     load destruct.wav into x
  1299.     play 
  1300.     reverse x into y
  1301.     play
  1302.     reverse y into z
  1303.     fc /b x z
  1304.     fc: no differences encountered
  1305.  
  1306.     L destruct.wav into x
  1307.     P
  1308.     V into y
  1309.     P
  1310.     V into z
  1311.     fc /b x z
  1312.     fc: no differences encountered
  1313.  
  1314.     L destruct.wav
  1315.     P
  1316.     V
  1317.     P
  1318.     V
  1319.     fc /b $N $O
  1320.     fc: no differences encountered
  1321.  
  1322.  
  1323. > srs -qN "L destruct.wav; P; V; P; V; fc /b $N $O"
  1324. fc: no differences encountered
  1325.  
  1326. --- 
  1327. There is a limit to the number of files that can be referenced 
  1328. internal to the program, and srs will remove the "oldest" file if 
  1329. it runs out of table space.  Because of this, batch processing 
  1330. could fail to produce the desired result.  
  1331.  
  1332.     Assuming there are more .wav files than there are 
  1333.     file-table entries:
  1334.  
  1335.         srs -c2 "cut *.wav into $I:r.2; save *.2"
  1336.  
  1337.     the command above will not save all of the "cut" files
  1338.     because we specified to srs to first perform the "cut" 
  1339.     action on all .wav files and then save all the generated
  1340.     .2 files, which means that those files first "cut" will be
  1341.     removed as the program continues processing the remaining
  1342.     files, after the number of files processed exceeds the
  1343.     number of file table entries.
  1344.  
  1345.     Fortunately, you can "save" directly after an action.
  1346.     Compare the command below to that above:
  1347.  
  1348.         srs -c2 "cut *.wav into $I:r.$C save"
  1349.  
  1350.     This syntax will cause the "cut" to be performed followed
  1351.     immediately by "save", for each of the .wav files.
  1352.     
  1353.  
  1354. srs D *.wav
  1355. srs play *.wav
  1356. srs P *.wav
  1357.  
  1358. ===================================================================
  1359. Disclaimer
  1360.  
  1361. This program and the accompanying SHARK utilites are provided as
  1362. "advertisement" for these and other programs available from SHARK.
  1363. No permission is granted for modifications to any of the programs
  1364. or their documentation, except for the srs.txt file which is to
  1365. have any and all comments desired added to its contents.  
  1366.  
  1367. Distribution of this package of files is encouraged.  SHARK hopes 
  1368. to bring "superuser" status to all those exposed to these programs.
  1369.  
  1370. These programs represent the latest "hot-off-the-press" versions,
  1371. and can not be guaranteed to be completely free of defects;  as
  1372. such, you should be reminded that they serve as advertisement for
  1373. themselves and other programs available from SHARK.  In no way can
  1374. SHARK or its employees be held liable for any use or misuse of
  1375. these programs.
  1376.  
  1377. ===================================================================
  1378. Other SHARK Programs
  1379.  
  1380. This is a list of other programs available.
  1381.  
  1382.     Program    Function
  1383.  
  1384.     SRS    sound file processing, and more
  1385.  
  1386.     dump    dump contents of file using templates
  1387.     fe    foreach processing of list using substitution
  1388.  
  1389.     grep    better "find", more than Unix grep
  1390.     sort    better "sort", multiple keys, types
  1391.     sed    edit stream
  1392.  
  1393.     cat    text/binary file concatenation
  1394.     math    input stream arithmetic processing
  1395.  
  1396.     ls    better "dir", attributes, sorted
  1397.     mv    better "ren", renames or moves directories and files
  1398.     rm    better "del", directories, hidden/system files
  1399.     more    better "more", multiple files, search, instant editor
  1400.     strings    display text in binary files
  1401.  
  1402.     form    Informix-like forms with text data-files
  1403.  
  1404.     fractal    guess (right!)
  1405.     sine    generate sine-wave binary files
  1406.  
  1407.     IP    graphic image processor
  1408.  
  1409.     MISC    miscellaneous utilities (s2m, head, tail, pipe, 
  1410.         cmp, dt, wc, vga, lotus)
  1411.  
  1412.  
  1413. It should be noted that these programs are in daily use by sharks and 
  1414. are guaranteed to work as specified or immediate corrections are made.
  1415.  
  1416. All programs are available as "advertisement" (read: free).  This 
  1417. should not discourage you from purchasing them, as each of these gets 
  1418. better as someone requests additional functionality.
  1419.     
  1420. SHARK Addresses
  1421.  
  1422.     Mail
  1423.  
  1424.         SHARK
  1425.         922 San Leandro Suite C
  1426.         Mountain View, CA 94043
  1427.  
  1428.     Telephone
  1429.  
  1430.         (415) 969-3015
  1431.  
  1432.     Fax
  1433.  
  1434.         (415) 969-6600
  1435.  
  1436.     Internet
  1437.  
  1438.         shark@parallax.com
  1439.  
  1440.  
  1441.     
  1442.  
  1443.  
  1444. Preface
  1445.  
  1446. We at SHARK would like to thank all those persons responsible for 
  1447. allowing us access to their computers over the past decade, and for 
  1448. posing to us problems to solve using them.  We hope to return the 
  1449. favor by writing programs that allow all users the ability to process 
  1450. information in ways previously impossible for them.  An example is 
  1451. this program, which, although written for use with sound files, was 
  1452. designed to use any kind of file, or sound file formats from any 
  1453. sound-board vendor, and in conjunction with other SHARK programs 
  1454. like dump and math, and in ways not-necessarily related to sound.
  1455.  
  1456. Although many users will find the command-line interface unacceptable
  1457. except for the simplest actions, we at SHARK believe there is no
  1458. substitute (we have been typing at terminals and consoles for years), 
  1459. and until computers can communicate via the spoken word, the only 
  1460. user-interface that is acceptable is either the command-line, or a 
  1461. menu system that generates the command-line and allows you to accept 
  1462. or modify its output.  In the meantime, the flexible method of 
  1463. specifying i/o, the automatic default buffer-naming, the shorthand 
  1464. action words, the scripting capability, the history mechanism, and
  1465. the command-line execution feature should eliminate much of the 
  1466. repetitive typing as well as provide functionality otherwise 
  1467. unattainable with the current spate of GUI stuff.
  1468.  
  1469. We hope that this program in its current stage of development proves 
  1470. satisfactory enough to continue using it.  However, we are lazy, and 
  1471. this version requires TOO MUCH typing!  Thus, we hope you register 
  1472. your copy of SRS so we can notify you when the menued version is ready.  
  1473. We would hate for SRS to leave a bad taste in your mouth simply because 
  1474. you must type in order to use it.  And we know that the display 
  1475. function is substandard; work on this was postponed until the ability 
  1476. to interact with the display is incorporated (this was not a majority 
  1477. decision;  some sharks felt that to be a severe shortcoming, but the 
  1478. others convinced them to wait until the UI was defined).
  1479.  
  1480. We would like to hear from all of you, especially those that have
  1481. found a real use for this program.  Because we are an independent
  1482. group of computer users, programmers and analysts, we can also offer
  1483. immediate response time for any additional features you might desire.
  1484. The program was designed to be easily enhanced, with new processing
  1485. modules simply included in the lists of words and functions.  This 
  1486. version has a minimal set of operations, but if you want or write a 
  1487. routine you would like incorporated into the program, we can do so.
  1488. In fact, using the SHARK system, we can develop a special version 
  1489. just for YOU!
  1490.  
  1491. Of course, the source code to SRS and all other SHARK utilities is
  1492. available to interested parties.
  1493.  
  1494. Regardless, have fun with the program.  
  1495.  
  1496. Introduction to SRS 
  1497.  
  1498. Who Could Use This Program
  1499.  
  1500. There are many "types" of users, and this program was designed to
  1501. work for a number of you.
  1502.  
  1503.  
  1504. Business Users 
  1505.  
  1506. As an example, you can now have a Multi-Media display station on
  1507. any computer that has both a graphics- and a sound-board.  It is
  1508. because this program was written to interface with the Operating 
  1509. System that you can easily combine graphics (from your favorite 
  1510. program) with sound (from srs, or any other sound-program).  With
  1511. commands as easy as:
  1512.  
  1513.     show slide1
  1514.     play slide1.sound
  1515.     pauseforkey 5 secs
  1516.  
  1517.     You can build presentations that will Knock Their Socks Off.
  1518.  
  1519.     You can build interactive training programs:
  1520.  
  1521.     :prob1            # Problem 1 Script
  1522.     play prob1.sound    # Play sound 
  1523.     show prob1.slide    # Display sound during Play
  1524.     getkey abcd        # get a key, a, b, c, d, or escape
  1525.     ifesc exit        # escape pressed, quit
  1526.     goto prob1$KEY        # go to label ":prob1$KEY", $KEY= key pressed
  1527.  
  1528.     :prob1a            # pressed a
  1529.     show prob1.nota.slide    # wrong answer!
  1530.     play prob1.nota.sound
  1531.     getkey            # wait for any key
  1532.     goto prob1        # do it again
  1533.  
  1534.     ...
  1535.  
  1536.     :prob1c            # pressed c
  1537.     show prob1.isc.slide    # correct!
  1538.     play prob1.isc.sound
  1539.     getkey            # wait for any key
  1540.     goto prob2        # next Problem
  1541.  
  1542.     ...
  1543.  
  1544.     In essence, you do not need to buy "Presentation Programs" for 
  1545.     100's (or 1000's) of $'s when you can use the "paint" program 
  1546.     you like best and the SHARK utilities, and do it your way (the 
  1547.     "advertisement" version of the program does not include the 
  1548.     full set of SHARK utilities nor interactive scripting).
  1549.  
  1550.  
  1551. Technical Users
  1552.  
  1553. For programmers and scientists, this program provides binary data
  1554. processing facilities, and when used in conjuction with the SHARK 
  1555. utilities, allows you to process data from virtually any other program
  1556. you use in ways previously unanticipated or impossible.
  1557.  
  1558.     It can translate ascii input into sound data elements allowing 
  1559.     srs to read the output from any other number-crunching program 
  1560.     such as gnuplot or spreadsheets.  As the program allows you to 
  1561.     add, subtract, and xor two buffers, considerable effort was 
  1562.     expended to provide precise operation, illustrated below by 
  1563.     performing operations that should have no net-effect and 
  1564.     verifying this using the fc program:
  1565.  
  1566.     set noname            # no "name" chunks otherwise, 
  1567.                     # fc will detect a difference
  1568.  
  1569.     load sound.wav into org        # "org" is source sound
  1570.  
  1571.     load org
  1572.     amp by 100 into amped        # double amplitude
  1573.     damp by 50 into damped        # halve doubled-amplitude
  1574.  
  1575.     fc /b org damped        # should be the same
  1576.     fc: no differences encountered
  1577.  
  1578.         
  1579.     load org
  1580.     load into added            # add echo to sound
  1581.     add org into added at 1 secs    
  1582.     add org into added at 2 secs    
  1583.  
  1584.     load added into subed        # remove echo from sound
  1585.     sub org into subed at 1 secs
  1586.     sub org into subed at 2 secs
  1587.  
  1588.     fc /b org subed            # should be the same
  1589.     fc: no differences encountered
  1590.  
  1591.  
  1592.     load org
  1593.     amp by 100 into amped        # double wave
  1594.  
  1595.     load org into added        # get wave
  1596.     add org into added        # add wave to itself
  1597.  
  1598.     fc /b amped added        # should be the same
  1599.     fc: no differences encountered
  1600.  
  1601.     Scientists and programmers can appreciate the ability to 
  1602.     provide graphic and arithmetic operations on raw data;  there 
  1603.     is little more frustrating than having a great program but 
  1604.     being unable to use your existing data-sets;  you may have 
  1605.     files containing analog data or programs capable of generating 
  1606.     samples of data but no means of gross manipulation or of even 
  1607.     display.  1-2-3 can generate dozens of columns of solutions to 
  1608.     trigonometric equations, but can display only 8192 samples per 
  1609.     data-set: so, generate a .prn file and process the text into 
  1610.     binary as discrete 8-bit data samples:
  1611.  
  1612.     > dectopcm data.prn data.buf
  1613.  
  1614.         "dectopcm.bat" consists of this command:
  1615.  
  1616.         math 255 & 128 - f"%c" x < %1 > %2
  1617.  
  1618.     This assumes that the values in data.prn mean:
  1619.  
  1620.          0         for no deflection, 
  1621.          1 to  127     for positive deflection
  1622.         -1 to -128     for negative deflection
  1623.  
  1624.     The math program does this:
  1625.         READ number,        # read from data.prn
  1626.         AND with 0xFF,         # 255 &
  1627.         SUBTRACT 0x80,         # 128 -
  1628.         DISPLAY as byte,     # f"%c" x
  1629.  
  1630.     and, in so doing, converts the decimal values to PCM format.  
  1631.  
  1632.         Of course, this calculation could be done 
  1633.         in the spreadsheet, but having this .bat 
  1634.         file allows you to convert any list of 
  1635.         numbers in merely seconds.
  1636.  
  1637.     The output file can then be read into srs:
  1638.  
  1639.     > srs save data.buf into data.wav
  1640.  
  1641. PC Users
  1642.  
  1643. For users who just want to fool around with their new hardware, this 
  1644. program is for you.  If you are using batch files, you can do things 
  1645. like make a "While You Were Out" system, or, if you have a network 
  1646. and other users with sound boards, use srs to record messages and then 
  1647. place into a public directory: jokes are funnier when heard (sometimes).  
  1648. If you use email, you can attach sound files to documents!  Record 
  1649. explanations to spreadsheets!  Use srs for dictation!  Record your voice
  1650. and have the computer answer your phone!  Have it say things to people
  1651. when you aren't there!  Record what goes on when you are away!  Really, 
  1652. the possibilities for (im)practical application of SRS and sound in
  1653. general are endless (actually, disk space can be a limiting factor)!
  1654.  
  1655.  
  1656. DOS Version
  1657.  
  1658. We no longer have DOS 2.x, so we are unable to test that.  If anything,
  1659. the .bat files will need to have "@echo" changed to "echo".
  1660.  
  1661.  
  1662.