home *** CD-ROM | disk | FTP | other *** search
/ Sound Sensations! / sound_sensations.iso / misc / ansip22b / musicode.ref < prev    next >
Encoding:
Text File  |  1992-02-01  |  15.2 KB  |  312 lines

  1.  
  2.  
  3.  
  4.                                         MUSIC CODES and SOUND CODES REFERENCE
  5.  
  6.  
  7.       Below is a listing of MUSIC CODES and SOUND CODES used with
  8.       ANSIPLAY.  This listing is purposed for reference only.
  9.  
  10.       For information on how to use the "Music String Syntax", consult
  11.       the file MSTRINGS.DOC.
  12.  
  13.       MUSIC CODE SYNTAX:  ESC[MF <music codes or sound codes)> (music note)
  14.                        or ESC[MB <music codes or sound codes)> (music note)
  15.  
  16.  
  17.                                 OCTAVES AND TONES
  18.                                 -----------------
  19.       A-G  Plays A, B, ..., G in current octave
  20.            # or +  After the note specifies sharp
  21.                 -  After the note specifies flat
  22.         >  Increases octave by 1. Octave cannot go beyond 6.
  23.            >> Increases by 2 octaves, etc.
  24.  
  25.         <  Decreases octave by 1. Octave cannot drop below 0.
  26.            << Decreases by 2 octaves, etc.
  27.  
  28.        OCTAVE:
  29.        On  Sets current octave (0-6)
  30.            Sets the current octave. There are seven octaves,
  31.            numbered 0-6.
  32.  
  33.        NOTE:
  34.        Nn  Plays note n (0-84)
  35.            The range for n is 0-84.  In the seven possible
  36.            octaves, there are 84 notes.  When n = 0, this means a rest.
  37.  
  38.           *(Below is a listing of notes, both by MUSIC CODES and
  39.             by SOUND CODES)
  40.  
  41.                             TONE DURATION AND TEMPO
  42.                             -----------------------
  43.       LENGTH:
  44.       Ln  Sets length of a note. (1-64)
  45.           The range for n is 1-64.  L 4 is a quarter note,  L 1 is a
  46.           whole note, etc.
  47.  
  48.           The length may also follow the note when a change of
  49.           length only is desired for a particular note. For
  50.           example,
  51.                    A 16 can be equivalent to L 16 A
  52.  
  53.       TEMPO:
  54.       Tn  Sets number of quarter notes per minute (32-255)
  55.           The range for n is 32-255. The default for n is 120.
  56.  
  57.           Note: Because of the slow clock-interrupt rate, some notes
  58.                 will not play at higher tempos (L 64 at T 255, for
  59.                 example).
  60.  
  61.  
  62.  
  63.                               * Page 1 *
  64.  
  65.  
  66.       MUSIC STACCATO:
  67.       MS  Sets "music staccato" so that each note will play 3/4 of
  68.           the time determined by the length (L).
  69.  
  70.       MUSIC NORMAL:
  71.       MN  Sets "music normal" so that each note will play 7/8 of
  72.           the time determined by the length (L).
  73.  
  74.       MUSIC LEGATO:
  75.       ML  Sets "music legato" so that each note will play the full
  76.           period set by length (L).
  77.  
  78.       PAUSE:
  79.       Pn  Pause for the duration of n quarternotes (1-64)
  80.           Specifies a pause, ranging from 1-64. This option
  81.           corresponds to the length of each note, set with Ln.
  82.  
  83.       DOT:
  84.       .   A period after a note causes the note to play 3/2 times
  85.           the length determined by L (length) times T (tempo). The
  86.           period has the same meaning as in a musical score.
  87.  
  88.           Multiple periods can appear after a note. Each period
  89.           adds a length equal to one half the length of the previous
  90.           period. For example,
  91.                "A."   plays 1 + 1/2 or 3/2 times the length
  92.                "A.."  plays 1 + 1/2 + 1/4 or 7/4 times the length.
  93.  
  94.           Periods can appear after a pause (P). In this case, the
  95.           pause length is scaled in the same way notes are scaled.
  96.  
  97.                                    OPERATION
  98.                                    ---------
  99.       MUSIC FOREGROUND:
  100.       MF  Sets music/sound to run in foreground
  101.  
  102.       MUSIC BACKGROUND:
  103.       MB  Sets music/sound to run in background
  104.  
  105.       See the manual (MANUALS.DOC) for more details on MF and MB.
  106.  
  107.           ========================================================
  108.           LISTING OF TONES, both by MUSIC CODES and by SOUND CODES
  109.           --------------------------------------------------------
  110.  
  111.       Example: The following codes will all yield the same tone...
  112.  
  113.                      MUSIC CODE    ESC[O0 C (music note)
  114.                      MUSIC CODE    ESC[N1 (music note)
  115.                      SOUND CODE    ESC[65.406;8 (music note)
  116.  
  117.  
  118.        IBM              HELMHOLTZ      MUSIC               SOUND
  119.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  120.       ------ ---------- ---------   -------------     ----------------
  121.                D#,E-                                       38.890
  122.                E                                           41.204
  123.                F                                           43.654
  124.  
  125.                               * Page 2 *
  126.  
  127.  
  128.        IBM              HELMHOLTZ      MUSIC               SOUND
  129.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  130.       ------ ---------- ---------   -------------     ----------------
  131.                F#,G-                                       46.250
  132.                G                                           49.000
  133.                G#,A-                                       51.914              
  134.                A                                           55.000
  135.                A#,B-                                       58.270
  136.                B                                           61.736
  137.       -------------------------------------------------------------
  138.       00       C         CC           N1                   65.406
  139.                C#,D-                  N2                   69.296
  140.                D                      N3                   73.416
  141.                D#,E-                  N4                   77.782
  142.                E                      N5                   82.406
  143.                F                      N6                   87.308
  144.                F#,G-                  N7                   92.498
  145.                G                      N8                   97.998
  146.                G#,A-                  N9                  103.826
  147.                A                      N10                 110.000
  148.                A#,B-                  N11                 116.540
  149.                B                      N12                 123.470
  150.       -------------------------------------------------------------
  151.       01       C         C            N13                 130.812
  152.                C#,D-                  N14                 138.592
  153.                D                      N15                 146.832
  154.                D#,E-                  N16                 155.564
  155.                E                      N17                 164.821
  156.                F                      N18                 174.614
  157.                F#,G-                  N19                 185.000
  158.                G                      N20                 195.998
  159.                G#,A-                  N21                 207.660
  160.                A                      N22                 220.000
  161.                A#,B-                  N23                 233.080
  162.                B                      N24                 246.940
  163.       -------------------------------------------------------------
  164.       02       C         c            N25                 261.620
  165.                C#,D-                  N26                 277.180
  166.                D                      N27                 296.660
  167.                D#,E-                  N28                 311.120
  168.                E                      N29                 329.620
  169.                F                      N30                 349.220
  170.                F#,G-                  N31                 370.000
  171.                G                      N32                 392.000
  172.                G#,A-                  N33                 415.300
  173.                A                      N34                 440.000
  174.                A#,B-                  N35                 466.160
  175.                B                      N36                 493.880
  176.       -------------------------------------------------------------
  177.       03       C         c' (middle)  N37                 523.260
  178.                C#,D-                  N38                 554.360
  179.                D                      N39                 587.320
  180.                D#,E-                  N40                 622.260
  181.                E                      N41                 659.260
  182.                F                      N42                 698.460
  183.                F#,G-                  N43                 739.980
  184.                G                      N44                 784.000
  185.                G#,A-                  N45                 830.600
  186.  
  187.                               * Page 3 *
  188.  
  189.        IBM              HELMHOLTZ      MUSIC               SOUND
  190.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  191.       ------ ---------- ---------   -------------     ----------------
  192.                A                      N46                 880.000
  193.                A#,B-                  N47                 892.320
  194.                B                      N48                 987.760
  195.       -------------------------------------------------------------
  196.       04       C         c''          N49                1046.500
  197.       default  C#,D-                  N50                1108.740
  198.       octave   D                      N51                1174.660
  199.                D#,E-                  N52                1244.500
  200.                E                      N53                1318.520
  201.                F                      N54                1396.920
  202.                F#,G-                  N55                1479.980
  203.                G                      N56                1567.980
  204.                G#,A-                  N57                1661.220
  205.                A                      N58                1760.000
  206.                A#,B-                  N59                1864.660
  207.                B                      N60                1975.540
  208.       -------------------------------------------------------------
  209.       05       C         c'''         N61                2093.000
  210.                C#,D-                  N62                2217.400
  211.                D                      N63                2349.400
  212.                D#,E-                  N64                2489.000
  213.                E                      N65                2637.000
  214.                F                      N66                2793.800
  215.                F#,G-                  N67                2960.000
  216.                G                      N68                3136.000
  217.                G#,A-                  N69                3322.400
  218.                A                      N70                3520.000
  219.                A#,B-                  N71                3729.400
  220.                B                      N72                3951.000
  221.       -------------------------------------------------------------
  222.       06       C         c''''        N73                4186.000
  223.                C#,D-                  N74                4435.000
  224.                D                      N75                4698.600
  225.                D#,E-                  N76                4978.000
  226.                E                      N77                5274.000
  227.                F                      N78                5587.600
  228.                F#,G-                  N79                5920.000
  229.                G                      N80                6272.000
  230.                G#,A-                  N81                6644.800
  231.                A                      N82                7040.000
  232.                A#,B-                  N83                7458.600
  233.                B                      N84                7902.200
  234.       -------------------------------------------------------------
  235.                C         cv           -                  8372.000
  236.                C#,D-                  -                  8869.800
  237.                D                      -                  9397.200
  238.                D#,E-                  -                  9956.000
  239.                E                      -                 10548.000
  240.                F                      -                 11175.400
  241.                F#,G-                  -                 11839.800
  242.                G                      -                 12543.800
  243.                G#,A-                  -                 13289.800
  244.                A                      -                 14080.000
  245.                A#,B-                  -                 14917.200
  246.                B                      -                 15804.200
  247.       -------------------------------------------------------------
  248.  
  249.                               * Page 4 *
  250.  
  251.  
  252.        IBM              HELMHOLTZ      MUSIC               SOUND
  253.       OCTAVE   NOTE     NOTATION    CODE (NOTE)   =   CODE (FREQUENCY)
  254.       ------ ---------- ---------   -------------     ----------------
  255.                C                      -                 16744.000
  256.                C#,D-                  -                 17739.600
  257.                D                      -                 18794.600
  258.                D#,E-                  -                 19912.200
  259.                E                      -                 21096.200
  260.                F                      -                 22350.600
  261.                F#,G-                  -                 23679.600
  262.                G                      -                 25083.800
  263.                G#,A-                  -                 26579.400
  264.                A                      -                 28160.000
  265.                A#,B-                  -                 29834.400
  266.                B                      -                 31608.600
  267.  
  268.       =============================================================
  269.  
  270.                                                SOUND CODES REFERENCE
  271.  
  272.       SOUND CODE SYNTAX:
  273.  
  274.        ESC[MF <FREQ; DURA; CYCLES; DELAY; VARI; SPKROFF> (music note)
  275.  
  276.              FREQUENCY          :  a numeric value from 37 to 32,767
  277.                 Frequency is the desired frequency in hertz.
  278.  
  279.              DURATION           :  an numberic value from 0 to 65,535
  280.                 Duration is how long the tone should play, measured
  281.                 in clock ticks. There are 18.2 clock ticks per second
  282.                 regardless of CPU speed.
  283.  
  284.              CYCLES (optional)  :  an integer from 0 to 9,999
  285.                 Cycles is the number of times to repeat the
  286.                 frequency/duration.
  287.  
  288.              DELAY  (optional)  :  an integer from 0 to 999,999,999
  289.                 Delay is the length of pause between cycles.
  290.                 ANSIPLAY will count from 0 to DELAY before proceeding.
  291.  
  292.              VARIATION (optional):  an numeric value from -9,999 to 9,999
  293.                 Variation will change the FREQUENCY each time the tone
  294.                 is repeated using the CYCLES variable.  FREQUENCY will
  295.                 use it's current value, add the VARIATION value to 
  296.                 itself (per cycle) to get a new FREQUENCY, then play
  297.                 the new FREQUENCY.
  298.  
  299.              SPKROFF (optional):  an integer of 1 or 0  (SpeakerOff)
  300.                 If SPKROFF = 1, then speaker will turn off for 1 clock
  301.                 tick between CYCLES.  This produces a broken sound
  302.                 effect.
  303.  
  304.                 If SPKROFF = 0 (default), then speaker remains on between
  305.                 CYCLES.  This produces a smooth glissando effect.
  306.  
  307.  
  308.       --end of documentation--
  309.  
  310.  
  311.                               * Page 5 *
  312.