home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 1 / AU_CD1.iso / demos / j_to_r / perform / _perform / techspec < prev    next >
Encoding:
Text File  |  1993-10-18  |  2.7 KB  |  124 lines

  1.                            Performer data structure
  2.                            ========================
  3.  
  4.      Filetype - &CB9
  5.  
  6. A Performer file is similar to a Rhapsody file in that it consists of a 
  7. series of slots, each of which has the following structure:
  8.  
  9.      number
  10.       of
  11.      bytes
  12.  
  13.      [1]  &FF
  14.      [1]  slot-length    (0-255)
  15.      [1]  code
  16.      [n]  <data>         (n = slot-length-3)
  17.  
  18.      There is no header slot.
  19.  
  20.      The last slot has the following form:
  21.  
  22.      [1]  &FF
  23.      [1]  0
  24.  
  25.  
  26. The following slot codes are currently defined. Other slot codes may be 
  27. defined in later versions and are ignored by Performer V 1.00.
  28.  
  29.  
  30.      Code 0 - Text
  31.  
  32.      [1]  &FF
  33.      [1]  slot-length
  34.      [1]  0
  35.      [n]  <text>              (n = slot-length-4)
  36.      [1]  &0D
  37.  
  38.      This code is ignored by Performer V 1.00
  39.  
  40.  
  41.      Code 1 - Set options
  42.  
  43.      [1]  &FF
  44.      [1]  slot-length
  45.      [1]  1
  46.      [4]  <option data>       (see note 1)
  47.  
  48.  
  49.      Code 2 - Play File
  50.  
  51.      [1]  &FF
  52.      [1]  slot-length
  53.      [1]  2
  54.      [4]  flags               (see note 2)
  55.      [n]  <full filename>     (n = slot_length-5. see note 3)
  56.      [1]  &0D
  57.  
  58.  
  59.      Code 3 - Play MIDI data
  60.  
  61.      [1]  &FF
  62.      [1]  slot-length
  63.      [1]  3
  64.      [n]  <MIDI data>         (n = slot-length-3. see note 4)
  65.  
  66.  
  67.      Code 4 - Send system reset
  68.  
  69.      [1]  &FF
  70.      [1]  3
  71.      [1]  4
  72.  
  73.      This code is not used by Performer V 1.00
  74.  
  75.  
  76.      Notes
  77.      -----
  78.  
  79.      1.   Option data         (4 bytes, LSB first)
  80.  
  81.      bits                     if set...
  82.  
  83.      0      MIDI flag           play MIDI
  84.      1      speaker flag        play speaker
  85.      2      continuous flag     play programme continuously
  86.      3      not used
  87.      4      repeat flag         play all repeats
  88.      5-7    speed               2=very slow....6=very fast
  89.      8-31   not used
  90.  
  91.  
  92.      2.   Play flags          (4 bytes, LSB first)
  93.  
  94.     bits                      if set...
  95.  
  96.      0      play flag           play this piece
  97.      1-23   not used
  98.      24-31  filetype            eg C00
  99.  
  100.  
  101.      3.   Play files
  102.  
  103.      4 types of file are recognised by Performer V 1.00
  104.  
  105.      1)     Rhapsody files     (filetype &C00, formats 0 or 1)
  106.      2)     MIDI files         (filetype &FD4, formats 0 or 1)
  107.      3)     Sample files       (filetype &D3C, signed linear)
  108.      4)     Programme files    (filetype &CB9)
  109.  
  110.      All other filetypes are sent to the CLI. This makes it possible to load
  111. voices, execute obey files and utilities etc. etc.
  112.  
  113.  
  114.      4.   MIDI data
  115.  
  116.      n bytes of MIDI data. The first byte must be a status byte (ie it must 
  117. have bit 7 set). Running status may be used within the data stream. Since
  118. the  stream terminates with &FF (the marker for the next slot), this code
  119. (system  reset) may not be used.
  120.  
  121.  
  122.                                         (c) J.O.Linton January 1991
  123.  
  124.