home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / music / intermus / mcsfilef.txt < prev    next >
Text File  |  1988-06-22  |  5KB  |  183 lines

  1.          The Music Construction Set File Format For The Atari ST
  2.          
  3.                             By Richard J. Plom
  4.                             
  5.  
  6.           Copyright 1988, INTERSECT Software & Electronic Arts,
  7.                              All rights reserved.
  8.                              
  9.  
  10.  
  11.  
  12. In this text we will explain the internal file format for MCS.  It is
  13. important to note since this is the internal format it is not easily
  14. ported. It is displayed here  in a sequential format.
  15.  
  16.  
  17. ***** Fread(filehandle,4L,magic)
  18. BYTE magic[4];
  19.  
  20. HEAD contains the Magic header which tells the program this is
  21. really one of its songs. It should always contain "STMC" otherwise
  22. it is bogus.
  23.  
  24. ***** Fread(filehandle,32L,header)
  25. SCRPHEAD header         
  26.  
  27. This contains the score header struct.
  28. typedef struct 
  29.      {
  30.      WORD tmp;       /* Tempo */
  31.      WORD pg_top;    /* Page Top */
  32.      WORD ky_sig;    /* Key Signature */
  33.      WORD phncs;     /* Midi Mode 0=poly 1=monophonic */
  34.      WORD rgb[4][3]; /* Colors, in vs_color format */
  35.      } SCRPHEAD;
  36. TMP      the score's overall tempo.
  37. PG_TOP   the highest page used in the score(there are 26 note positions per page ).
  38. KY_SIG   the score's key signature(1-15, C,G,... in same order as the key drop down
  39.                                                  in MCS.).
  40. PHNCS    the midi mode 0 for poly, 1 for monophonic
  41. RGB      the for score colors in vs_color format
  42.  
  43.  
  44. ***** Fread(filehandle,312L,about)
  45. SCI about;
  46.  
  47. This contains the score's "ABOUT" information struct.
  48.  
  49. typedef struct {                /* Score Text Information */
  50.       char title[26];           /* Score title */
  51.       char auth[42];            /* Score Author */
  52.       char cdate[25];           /* Creation date */
  53.       char comments[5][45];     /* Score Comments */
  54.       } SCI;
  55.  
  56. ***** Fread(filehandle,960L,instrumentdata)
  57.  
  58. Sorry, the format of the internal sound driver is propriety.
  59.  
  60.  
  61. ***** Score data is stored out in track format.
  62.  
  63. Fread(filehandle,(long)pg_top * 104L,trak1)
  64. Fread(filehandle,(long)pg_top * 104L,trak2)
  65. Fread(filehandle,(long)pg_top * 104L,trak3)
  66.  
  67. Each trak consists of several events. An event is a 4 byte field which
  68. can be anything from a note to a repeat.
  69.  
  70. The following is a description of the note events and their parameters:
  71.  
  72. *NADA 0: an empty space in the score, the three remaining bytes are empty.
  73.  
  74. *NOTE 1: BYTE 2 is the type of note, the following:
  75.                (1=WHOLE REST,2=HALF REST,...6=THIRTY SECOND REST)
  76.                (7-12,same sequence as above only dotted)
  77.                (13-18, WHOLE NOTE,2=HALF NOTE,...6=THIRTY SECOND NOTE)
  78.                (19-24) same sequence as above only dotted)
  79.                (25-30) same sequence as 13-18, only flat)
  80.                (31-36) same sequence as 13-18, flat & dotted)
  81.                (37-42) same sequence as 13-18, only sharp)
  82.                (43-48) same sequence as 13-18, sharp & dotted)
  83.                (49-54) same sequence as 13-18, only natural)
  84.                (55-60) same sequence as 13-18, natural & dotted)
  85.  
  86.           BYTE 3: 1-16 the instrument used.
  87.         
  88.           BYTE 4: full step position on staff. 0-35, 0 is high C, and 35 is low C.
  89.  
  90. *REST 2 : BYTE 2 is the type of note, the following:
  91.                (1=WHOLE REST,2=HALF REST,...6=THIRTY SECOND REST)
  92.                (7-12,same sequence as above only dotted)
  93.  
  94.           BYTE 3: empty.
  95.           
  96.           BYTE 4: full step position on staff. 0-35, 0 is high C, and 35 is low C.
  97.  
  98.  
  99. *MEASURE 3 or 11 : A measure, all timing get reset.
  100.              The three remaining bytes are empty.
  101.  
  102.  
  103. *QUIN 4:  Quintuplet flag, the next note is played as a quintuplet
  104.  
  105.           BYTE 2-3 empty.
  106.  
  107.           BYTE 4: full step position on staff. 0-35, 0 is high C, and 35 is low C.
  108.  
  109.  
  110.  
  111. *TRIP 5:  triplet flag, the next note is played as a triplet
  112.  
  113.           BYTE 2-3 empty.
  114.  
  115.           BYTE 4: full step position on staff. 0-35, 0 is high C, and 35 is low C.
  116.  
  117.  
  118. *START_REPEAT 6: Beginning of a repeating sequence.
  119.  
  120.           BYTE 2 empty.
  121.  
  122.           BYTE 3 number of times to repeat.
  123.  
  124.           BYTE 4 empty.
  125.           
  126.  
  127.  
  128. *END_REPEAT 7: Go back to beginning of repeat.
  129.              The three remaining bytes are empty.
  130.  
  131. *OCT_UP 8:  octave raiser flag, the next note is played an octave higher.
  132.  
  133.           BYTE 2-3 empty.
  134.  
  135.           BYTE 4: full step position on staff. 0-35, 0 is high C, and 35 is low C.
  136.  
  137. *OCT_DOWN 8:  octave down flag, the next note is played an octave lower.
  138.  
  139.           BYTE 2-3 empty.
  140.  
  141.           BYTE 4: full step position on staff. 0-35, 0 is high C, and 35 is low C.
  142.  
  143. *NU_TIME 10: Change time signature.
  144.  
  145.           BYTE 2 number of time sig. to use.
  146.                  100 = 2/4;
  147.                  101 = 4/4;
  148.                  102 = 6/8;
  149.                  103 = 3/4;
  150.                  104 = 2/2;
  151.                  105 = 3/8;
  152.                  106 = 3/2;
  153.                  107 = 6/4;
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161. **** Fread(filehandle,8L,midi_channel) 
  162. This assigns a voice to a midi channel.
  163.  
  164. WORD midi_channel[4];
  165.  
  166.      midi_channel[0] empty.
  167.      midi_channel[1] = voice 1
  168.      etc..
  169.      
  170.  
  171.  
  172. ***** Fread(filehandle,2L,&uo_inst)
  173. This is the instrument used if polyphonic is selected.
  174.  
  175. WORD uo_inst;
  176.  
  177.  
  178.  
  179.  
  180. This basically wraps up our description, it is very cryptic I know, but
  181. it was never intended to be used by anything else.
  182.  
  183.