home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magic 1995 #1 / CDM_5.ISO / shell / graph / ansi / smile.upd < prev    next >
Encoding:
Internet Message Format  |  1992-05-29  |  11.4 KB

  1. Date: 24 May 92  21:50:00  From: Michael Arnett
  2. To:   All                  Subj: ANSI\MUSIC TEXT
  3.  
  4.  
  5.                       S M I L E    N E W S
  6.  
  7. I have been working on updates to SMILE and SMILE Quick. A version of
  8. SMILE Tunes is almost ready for release.  So, if you have a suggestion
  9. or have found a bug... now is the time.
  10.  
  11.    Fixed:  Problem with EGA display after UPDATE option
  12.    Fixed:  Problem with pop-up menus in DesqView
  13.    Increased speed of UPDATE option.
  14.    Now supports unlimited characters per line.
  15.    Enter multiple lines of music between one sequence of Esc[ and CTRL-N
  16.    Increased available memory when calling Editors
  17.  
  18. I have also been working on the following documents to include as
  19. reference material in the SMILE package.  If you have a more detailed
  20. document or other information you would like to have included, please
  21. send it along for review.  Your comments and suggestions are welcomed.
  22.  
  23. =========================================================================
  24.  
  25.          S M I L E   S U P P O R T E D   A N S I   C O D E S
  26.  
  27. "Esc" is used to denote a true ASCII Escape character throughout this
  28. document.  Normally text editors will display the Escape character as
  29. ^[ or a small arrow pointing left.  Most text editors allow typing
  30. an Escape character by one of the following methods:
  31.  
  32.    Hold the ALT key and type 27 on the keypad
  33.    Hold the CTRL key and press [
  34.    Precede the Escape key with a CTRL-KEY combination
  35.  
  36. For example, you may enter an ESC character in QEDIT by first pressing
  37. CTRL-P then ESC.  See your editor documentation for more information 
  38. on entering Escape sequences.
  39.       
  40. Escape sequence parameters are case sensitive.
  41.  
  42.  
  43. SCREEN ATTRIBUTES ----------------------------------------------------
  44.  
  45. Syntax: Esc [#;#;...m
  46.  
  47. Where # parameters are one of the following numbers
  48.  
  49.    (ATTRIBUTES)
  50.  
  51. 0  All attributes off  (white on black)
  52. 1  Bold on             (High intensity)
  53. 4  Underscore on       (monochrome display only)       NOT SUPPORTED
  54. 5  Blink on
  55. 7  Reverse video on                                    NOT SUPPORTED
  56. 8  Concealed on                                        NOT SUPPORTED
  57.  
  58.    (FOREGROUND)   (with BOLD)
  59.  
  60. 30 Black           Dark Gray
  61. 31 Red             Light Red
  62. 32 Green           Light Green
  63. 33 Brown           Yellow
  64. 34 Blue            Light Blue
  65. 35 Magenta         Light Magenta
  66. 36 Cyan            Light Cyan
  67. 37 Gray            White
  68.  
  69.    (BACKGROUND)
  70.  
  71. 40 Black
  72. 41 Red
  73. 42 Green
  74. 43 Brown
  75. 44 Blue
  76. 45 Magenta
  77. 46 Cyan
  78. 47 Gray
  79.  
  80. EXAMPLES:  Esc [1;33;44m   Set colors (1)BOLD (33)YELLOW on (44)BLUE
  81.            Esc [0m         All attributes off, color to Black on white
  82.  
  83.  
  84. CURSOR CONTROL SEQUENCES ---------------------------------------------
  85.  
  86. Cursor Position:  Esc [r;cH  or  Esc [r;cf
  87.                   r = Row/line #
  88.                   c = Column #
  89.         EXAMPLE:  Esc [1,1H  or  Esc [H  Moves cursor to Row 1 Column 1
  90.         DEFAULT:  1         
  91.  
  92. Cursor Up      :  Esc [#A
  93.                   # = Number of rows/lines to move cursor
  94.         EXAMPLE:  Esc [5A   Move cursor UP 5 lines in the same column
  95.         DEFAULT:  1
  96.  
  97. Cursor Down    :  Esc [#B
  98.                   # = Number of rows/lines to move cursor
  99.         EXAMPLE:  Esc [5B   Move cursor DOWN 5 lines in the same column
  100.         DEFAULT:  1
  101.  
  102. Cursor Right   :  Esc [#C
  103.                   # = Number of columns to move cursor
  104.         EXAMPLE:  Esc [5C   Move cursor RIGHT 5 columns on the same line
  105.         DEFAULT:  1
  106.  
  107. Cursor Left    :  Esc [#D
  108.                   # = Number of columns to move cursor
  109.         EXAMPLE:  Esc [5A   Move cursor LEFT 5 columns on the same line
  110.         DEFAULT:  1
  111.  
  112. Save Cursor    :  Esc [s
  113.                   Saves cursor Row and Column infomation
  114.  
  115. Restore Cursor :  Esc [u
  116.                   Restores cursor position to value saved in
  117.                   Save Cursor sequence.
  118.  
  119.  
  120. SCREEN ERASE SEQUENCES -----------------------------------------------
  121.  
  122. Erase Display  :  Esc [2J
  123.                   Erase the screen and moves cursor to top left (HOME)
  124.           
  125. Erase Line     :  Esc [K
  126.                   Erase from cursor to the end of the line
  127.  
  128.  
  129. SET MODE and KEYBOARD REASSIGNMENT sequences are ignored by SMILE 
  130. programs so are not listed here.  See your DOS manual for more details.
  131.  
  132.  
  133. NOTES:
  134.  
  135. When uploading ANSI screens to bulletin boards make certain the file 
  136. ends with the sequence  ESC[0m  so that colors are reset.  Otherwise 
  137. you could leave the screen BLINKING or set to undesirable color 
  138. combinations.
  139.  
  140. Several combinations of line length and number of lines are supported 
  141. by various BBS software.  For best results, check with the SYSOP of 
  142. the board you will be uploading to.  Otherwise, for most consistant 
  143. results, save your ANSI screens at 70-72 characters per line.
  144.  
  145.  
  146. =====================================================================
  147.  
  148.  
  149.   S M I L E   S U P P O R T E D   M U S I C \ S O U N D    C O D E S
  150.  
  151.  
  152. Music and Sound Codes follow the format of the BASIC language commands
  153. PLAY and SOUND.  The major difference is a "Trigger Sequence" is needed
  154. to turn on the Music Routine in SMILE that emulates those BASIC 
  155. commands.  Many BBS programs and ANSI viewers also support this type of 
  156. music format.  It just so happens that the Music "Trigger Sequence" in
  157. these programs is ESC[ which is identical to the "Trigger Sequence" 
  158. used to begin an ANSI Escape sequence.  So, this Music Code format has
  159. "generally" become known as ANSI MUSIC.   For convience this document 
  160. will use that name to describe SMILE supported Music and Sound commands.
  161.  
  162.  
  163. ANSI MUSIC is actually made up of a three part string, or sequence of 
  164. characters.
  165.  
  166.   (1)        (2)             (3)
  167.   Trigger    Music\Sound     Terminate
  168.  
  169.   ESC[       <commands>      CTRL-N
  170.  
  171.  
  172.   (1) The trigger sequence is ESCape (Dec 27) + [ (Dec 91)  followed by
  173.       either MF (Music Foreground) or MB (Music Background).
  174.  
  175.   (2) A string of music commands (see below).  Blank spaces are ignored.
  176.  
  177.   (3) The terminate character is CTRN-N (Dec 14)
  178.  
  179. The MUSIC\SOUND routine in SMILE is triggered by ESC[MF or ESC[MB and 
  180. begins to interpret the following charactes as MUSIC or SOUND until the 
  181. terminate character CTRL-N is read.
  182.  
  183. MUSIC COMMANDS
  184.  
  185.           Please refer to your BASIC manual for information on the
  186.           BASIC Play commands.  The following are all valid for
  187.           beginning a Music string in SMILE: MF, MB, MN, ML, MS.
  188.           Although MB (Music Background) is valid, true backgroud    
  189.           music is NOT supported at this time.
  190.      
  191.           Syntax: MF T120 O2 C8D8E8F8G4
  192.  
  193.  
  194.           MF  Music Foreground 
  195.           MB  Music Background  (not supported, defaults to MF)
  196.  
  197.           MS  Music Staccato    notes play 3\4 of designated Length
  198.           MN  Music Normal      notes play 7\8 of designated Length
  199.           ML  Music Legato      notes play full designated Length
  200.   
  201.           A,B,C,D,E,F,G    Play the specified note in current octive
  202.           Following a note:
  203.             1-64     Set note length (Ex. A8 = play note A as 1\8 note)
  204.             # or +   indicates Sharpened note.
  205.             -        indicates Flattened note.   
  206.             .        increases not length by 1\2.
  207.  
  208.           On  Octive Range (n = 0-6)    ** Default is 4
  209.               Select from seven available octives
  210.  
  211.           >   Raise Octive one step
  212.           <   Lower Octive one step
  213.  
  214.           Nn  Note Value   (n = 0-84)   ** Default is 4 - Quarter Note
  215.               There are 84 possible notes in seven octives.
  216.  
  217.           Ln  Note Length  (n = 1-64) Sets following notes to the value
  218.               of "n" until value is changed.
  219.               1 = Whole Note, 2 = Half Note, 4 = Quarter Note  etc
  220.  
  221.           Tn  Tempo        (n = 32-255) ** Default is 120
  222.               Number of Quarter notes per minute
  223.  
  224.     Example:  Add the Trigger Sequence and Terminate character to the 
  225.               following Music string to PLAY Happy Birthday.
  226.  
  227.  
  228.     MFT120MNO3C6C8D4C4F4E2C6C8D4C4G4F2C6C8O4C4O3A4F4E4D2B-6B-8A4F4G4F2
  229.  
  230.  
  231.  
  232. SOUND COMMANDS ---------------------------------------------------------
  233.  
  234.  
  235.           ( Thanks to Julie Ibarra, author of ANSIPLAY for this idea )
  236.  
  237.           Sound commands are not yet supported by any BBS software I am
  238.           aware of.
  239.      
  240.           Syntax: 
  241.           Esc[MF Freq; Duration; Cycles; CycleDelay; Variation CTRL-N
  242.      
  243.           Custom Sounds are supported in SMILE by using a SOUND CODE
  244.           similar to that found in BASIC and the program ANSIPLAY.
  245.           However, the SOUND generator in SMILE differs from the
  246.           SOUND command in BASIC.  Therefore, different frequency
  247.           values must be used to produce the musical notes.  These
  248.           are listed somewhere down the page.
  249.      
  250.           The SOUND statement uses the same Trigger Sequence and 
  251.           Terminate Characters discussed above for a normal music string.
  252.           The SOUND CODE consists of the following parameters serparated
  253.           by a semicolon (;) :
  254.      
  255.           FREQ     : Frequency of note to be played.  The effective 
  256.                      range of frequencies is 0 to 7904.  
  257.                      (0..65535)
  258.           
  259.           DURATION : Time, in milliseconds, the note should be played.  
  260.                      (0..65535)
  261.              
  262.           CYCLES   : Number of times to repeat Frequency/Duration.
  263.                      (0..65535)
  264.              
  265.           DELAY    : Time, in milliseconds, between cycles.  
  266.                      (0..65535)
  267.              
  268.           VARIATION: Frequency value is changed by this number for
  269.                      each CYCLE the note is played.  
  270.                      (-65535..65535)
  271.      
  272.           (** 1 second = 1000 milliseconds **)
  273.              
  274.      
  275.           SOUND CODE Frequency Values (84 Notes - 7 Octives):
  276.  
  277.             C    C#   D    D#   E    F    F#   G    G#   A    A#   B
  278.        
  279.             65   69   73   78   82   87   92   98  104  110  116  123 
  280.            131  139  147  156  165  175  185  196  208  220  233  247 
  281.            262  278  294  312  330  350  370  392  416  440  466  494 
  282.            524  556  588  624  660  700  740  784  832  880  932  988 
  283.           1048 1112 1176 1248 1320 1400 1480 1568 1664 1760 1864 1976 
  284.           2096 2224 2352 2496 2640 2800 2960 3136 3328 3520 3728 3952 
  285.           4192 4448 4704 4992 5280 5600 5920 6272 6656 7040 7456 7904  
  286.  
  287.           Example:  Add the Trigger Sequence and Terminate character
  288.                     to the following sample SOUND string.
  289.  
  290.             MF 660;25;20;10;-10
  291.                
  292.                660  Play Note E in Octive 4
  293.                 25  Play Note E for 25 milliseconds
  294.                 20  Repeat 20 times
  295.                 10  Delay 10 milliseconds before repeating Note
  296.                -10  Decrease not Note value by 10 each cycle 
  297.           
  298.  
  299.           One advantage of the SOUND CODE is the ability to place a
  300.           PAUSE in your ANSI screens without having to use a
  301.           multitude of ESC[s codes.  Just use a SOUND CODE with the
  302.           DELAY set very high to get a pause.  For example,
  303.      
  304.           ESC[MF ;;;60000
  305.      
  306.           would pause your ANSI Screen for 60 seconds, or until a key
  307.           is pressed when viewing it with SMILE.  Remember, these 
  308.           SOUND CODES are not supported by bulletin boards...(yet)!
  309.  
  310.  
  311. .ORIGIN: 001/030 - ░░▒▒▓█ THE GAVEL █▓▒▒░░ * RES IPSA * HST-DS * HOUSTON
  312.