home *** CD-ROM | disk | FTP | other *** search
- Date: 24 May 92 21:50:00 From: Michael Arnett
- To: All Subj: ANSI\MUSIC TEXT
-
-
- S M I L E N E W S
-
- I have been working on updates to SMILE and SMILE Quick. A version of
- SMILE Tunes is almost ready for release. So, if you have a suggestion
- or have found a bug... now is the time.
-
- Fixed: Problem with EGA display after UPDATE option
- Fixed: Problem with pop-up menus in DesqView
- Increased speed of UPDATE option.
- Now supports unlimited characters per line.
- Enter multiple lines of music between one sequence of Esc[ and CTRL-N
- Increased available memory when calling Editors
-
- I have also been working on the following documents to include as
- reference material in the SMILE package. If you have a more detailed
- document or other information you would like to have included, please
- send it along for review. Your comments and suggestions are welcomed.
-
- =========================================================================
-
- S M I L E S U P P O R T E D A N S I C O D E S
-
- "Esc" is used to denote a true ASCII Escape character throughout this
- document. Normally text editors will display the Escape character as
- ^[ or a small arrow pointing left. Most text editors allow typing
- an Escape character by one of the following methods:
-
- Hold the ALT key and type 27 on the keypad
- Hold the CTRL key and press [
- Precede the Escape key with a CTRL-KEY combination
-
- For example, you may enter an ESC character in QEDIT by first pressing
- CTRL-P then ESC. See your editor documentation for more information
- on entering Escape sequences.
-
- Escape sequence parameters are case sensitive.
-
-
- SCREEN ATTRIBUTES ----------------------------------------------------
-
- Syntax: Esc [#;#;...m
-
- Where # parameters are one of the following numbers
-
- (ATTRIBUTES)
-
- 0 All attributes off (white on black)
- 1 Bold on (High intensity)
- 4 Underscore on (monochrome display only) NOT SUPPORTED
- 5 Blink on
- 7 Reverse video on NOT SUPPORTED
- 8 Concealed on NOT SUPPORTED
-
- (FOREGROUND) (with BOLD)
-
- 30 Black Dark Gray
- 31 Red Light Red
- 32 Green Light Green
- 33 Brown Yellow
- 34 Blue Light Blue
- 35 Magenta Light Magenta
- 36 Cyan Light Cyan
- 37 Gray White
-
- (BACKGROUND)
-
- 40 Black
- 41 Red
- 42 Green
- 43 Brown
- 44 Blue
- 45 Magenta
- 46 Cyan
- 47 Gray
-
- EXAMPLES: Esc [1;33;44m Set colors (1)BOLD (33)YELLOW on (44)BLUE
- Esc [0m All attributes off, color to Black on white
-
-
- CURSOR CONTROL SEQUENCES ---------------------------------------------
-
- Cursor Position: Esc [r;cH or Esc [r;cf
- r = Row/line #
- c = Column #
- EXAMPLE: Esc [1,1H or Esc [H Moves cursor to Row 1 Column 1
- DEFAULT: 1
-
- Cursor Up : Esc [#A
- # = Number of rows/lines to move cursor
- EXAMPLE: Esc [5A Move cursor UP 5 lines in the same column
- DEFAULT: 1
-
- Cursor Down : Esc [#B
- # = Number of rows/lines to move cursor
- EXAMPLE: Esc [5B Move cursor DOWN 5 lines in the same column
- DEFAULT: 1
-
- Cursor Right : Esc [#C
- # = Number of columns to move cursor
- EXAMPLE: Esc [5C Move cursor RIGHT 5 columns on the same line
- DEFAULT: 1
-
- Cursor Left : Esc [#D
- # = Number of columns to move cursor
- EXAMPLE: Esc [5A Move cursor LEFT 5 columns on the same line
- DEFAULT: 1
-
- Save Cursor : Esc [s
- Saves cursor Row and Column infomation
-
- Restore Cursor : Esc [u
- Restores cursor position to value saved in
- Save Cursor sequence.
-
-
- SCREEN ERASE SEQUENCES -----------------------------------------------
-
- Erase Display : Esc [2J
- Erase the screen and moves cursor to top left (HOME)
-
- Erase Line : Esc [K
- Erase from cursor to the end of the line
-
-
- SET MODE and KEYBOARD REASSIGNMENT sequences are ignored by SMILE
- programs so are not listed here. See your DOS manual for more details.
-
-
- NOTES:
-
- When uploading ANSI screens to bulletin boards make certain the file
- ends with the sequence ESC[0m so that colors are reset. Otherwise
- you could leave the screen BLINKING or set to undesirable color
- combinations.
-
- Several combinations of line length and number of lines are supported
- by various BBS software. For best results, check with the SYSOP of
- the board you will be uploading to. Otherwise, for most consistant
- results, save your ANSI screens at 70-72 characters per line.
-
-
- =====================================================================
-
-
- 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
-
-
- Music and Sound Codes follow the format of the BASIC language commands
- PLAY and SOUND. The major difference is a "Trigger Sequence" is needed
- to turn on the Music Routine in SMILE that emulates those BASIC
- commands. Many BBS programs and ANSI viewers also support this type of
- music format. It just so happens that the Music "Trigger Sequence" in
- these programs is ESC[ which is identical to the "Trigger Sequence"
- used to begin an ANSI Escape sequence. So, this Music Code format has
- "generally" become known as ANSI MUSIC. For convience this document
- will use that name to describe SMILE supported Music and Sound commands.
-
-
- ANSI MUSIC is actually made up of a three part string, or sequence of
- characters.
-
- (1) (2) (3)
- Trigger Music\Sound Terminate
-
- ESC[ <commands> CTRL-N
-
-
- (1) The trigger sequence is ESCape (Dec 27) + [ (Dec 91) followed by
- either MF (Music Foreground) or MB (Music Background).
-
- (2) A string of music commands (see below). Blank spaces are ignored.
-
- (3) The terminate character is CTRN-N (Dec 14)
-
- The MUSIC\SOUND routine in SMILE is triggered by ESC[MF or ESC[MB and
- begins to interpret the following charactes as MUSIC or SOUND until the
- terminate character CTRL-N is read.
-
- MUSIC COMMANDS
-
- Please refer to your BASIC manual for information on the
- BASIC Play commands. The following are all valid for
- beginning a Music string in SMILE: MF, MB, MN, ML, MS.
- Although MB (Music Background) is valid, true backgroud
- music is NOT supported at this time.
-
- Syntax: MF T120 O2 C8D8E8F8G4
-
-
- MF Music Foreground
- MB Music Background (not supported, defaults to MF)
-
- MS Music Staccato notes play 3\4 of designated Length
- MN Music Normal notes play 7\8 of designated Length
- ML Music Legato notes play full designated Length
-
- A,B,C,D,E,F,G Play the specified note in current octive
- Following a note:
- 1-64 Set note length (Ex. A8 = play note A as 1\8 note)
- # or + indicates Sharpened note.
- - indicates Flattened note.
- . increases not length by 1\2.
-
- On Octive Range (n = 0-6) ** Default is 4
- Select from seven available octives
-
- > Raise Octive one step
- < Lower Octive one step
-
- Nn Note Value (n = 0-84) ** Default is 4 - Quarter Note
- There are 84 possible notes in seven octives.
-
- Ln Note Length (n = 1-64) Sets following notes to the value
- of "n" until value is changed.
- 1 = Whole Note, 2 = Half Note, 4 = Quarter Note etc
-
- Tn Tempo (n = 32-255) ** Default is 120
- Number of Quarter notes per minute
-
- Example: Add the Trigger Sequence and Terminate character to the
- following Music string to PLAY Happy Birthday.
-
-
- MFT120MNO3C6C8D4C4F4E2C6C8D4C4G4F2C6C8O4C4O3A4F4E4D2B-6B-8A4F4G4F2
-
-
-
- SOUND COMMANDS ---------------------------------------------------------
-
-
- ( Thanks to Julie Ibarra, author of ANSIPLAY for this idea )
-
- Sound commands are not yet supported by any BBS software I am
- aware of.
-
- Syntax:
- Esc[MF Freq; Duration; Cycles; CycleDelay; Variation CTRL-N
-
- Custom Sounds are supported in SMILE by using a SOUND CODE
- similar to that found in BASIC and the program ANSIPLAY.
- However, the SOUND generator in SMILE differs from the
- SOUND command in BASIC. Therefore, different frequency
- values must be used to produce the musical notes. These
- are listed somewhere down the page.
-
- The SOUND statement uses the same Trigger Sequence and
- Terminate Characters discussed above for a normal music string.
- The SOUND CODE consists of the following parameters serparated
- by a semicolon (;) :
-
- FREQ : Frequency of note to be played. The effective
- range of frequencies is 0 to 7904.
- (0..65535)
-
- DURATION : Time, in milliseconds, the note should be played.
- (0..65535)
-
- CYCLES : Number of times to repeat Frequency/Duration.
- (0..65535)
-
- DELAY : Time, in milliseconds, between cycles.
- (0..65535)
-
- VARIATION: Frequency value is changed by this number for
- each CYCLE the note is played.
- (-65535..65535)
-
- (** 1 second = 1000 milliseconds **)
-
-
- SOUND CODE Frequency Values (84 Notes - 7 Octives):
-
- C C# D D# E F F# G G# A A# B
-
- 65 69 73 78 82 87 92 98 104 110 116 123
- 131 139 147 156 165 175 185 196 208 220 233 247
- 262 278 294 312 330 350 370 392 416 440 466 494
- 524 556 588 624 660 700 740 784 832 880 932 988
- 1048 1112 1176 1248 1320 1400 1480 1568 1664 1760 1864 1976
- 2096 2224 2352 2496 2640 2800 2960 3136 3328 3520 3728 3952
- 4192 4448 4704 4992 5280 5600 5920 6272 6656 7040 7456 7904
-
- Example: Add the Trigger Sequence and Terminate character
- to the following sample SOUND string.
-
- MF 660;25;20;10;-10
-
- 660 Play Note E in Octive 4
- 25 Play Note E for 25 milliseconds
- 20 Repeat 20 times
- 10 Delay 10 milliseconds before repeating Note
- -10 Decrease not Note value by 10 each cycle
-
-
- One advantage of the SOUND CODE is the ability to place a
- PAUSE in your ANSI screens without having to use a
- multitude of ESC[s codes. Just use a SOUND CODE with the
- DELAY set very high to get a pause. For example,
-
- ESC[MF ;;;60000
-
- would pause your ANSI Screen for 60 seconds, or until a key
- is pressed when viewing it with SMILE. Remember, these
- SOUND CODES are not supported by bulletin boards...(yet)!
-
-
- .ORIGIN: 001/030 - ░░▒▒▓█ THE GAVEL █▓▒▒░░ * RES IPSA * HST-DS * HOUSTON
-