home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / SSS-FORM.TXT < prev    next >
Text File  |  1996-01-04  |  8KB  |  229 lines

  1. This Document release Date: 11/8/93 (ver 1.0 of "SSS-form.txt")
  2.  
  3. THE STUDIO SESSION SONG FILE FORMAT (Editor version 1.0)
  4. --------------------------------------------------------
  5. Format created by: Steve Capps <capps@applelink.apple.com>, Mark Zimmer,
  6. Tom Hedges, Ed Bogas, Nick Borelli, Ty Roberts, and Neil Cormia
  7. of Bogas Software in 1986.
  8.  
  9. This hacked-together description by: Jamal Hannah <jamal@gnu.ai.mit.edu>
  10.  
  11. There are 12 fields and 6 tracks to this format.. on old Macs, since you
  12. use complex waveforms for these sounds, you'll probabaly have to
  13. simulate the multiple sound channels by combining them on the fly
  14. with some fancy math.  I think there is actualy a Mac Toolbox call
  15. to do this in the origional "Sound Driver" chapter of Inside Macintosh.
  16.  
  17. File Signatures (Macintosh Only)
  18. Type:        'XSNG' (sometimes 'DSNG' or 'JSNG')
  19. Creator:    'XPRT'
  20.  
  21. Offset    Field        Length
  22. 0    Tempo        2    range: 10-450
  23. 2    unused        2    should be nul ($0000)
  24. 4    TimeSignature    2    decimal ranges of each byte: 1-32,1-32
  25. 6    Pascal string names of Instrument Files begin here, each followed
  26. by 2 nul bytes. ($00 $00)
  27. ??    unused        1    (should be $00.. if there are no instruments,
  28.                 this will come right after TimeSignature)
  29. ??    unused        64
  30. ??    Data for track 1, terminated by $B0
  31. ??    Data for track 2, terminated by $B0
  32. ??    Track 3  "
  33. ??    Track 4  "
  34. ??    Track 5  "
  35. ??    Track 6  "
  36.  
  37. Instruments are implicitly numbered from 01 onward, starting with the
  38. first one listed.  They are the exact name of the Studio Session
  39. Instrument file, which should be on the same volume or directory.
  40.  
  41. Track data consists of the following commands, which represent notes
  42. and other components on a musical staff:
  43.  
  44. COMMANDS (with fields and field names):
  45.  
  46. ending          $C0 xx (endingNumber)
  47. timeSignature    $BD xx xx (timeSigTop,timeSigBottom)
  48. barLine        $BA
  49. newInstrument    $B9 xxxx (instrumentNumber)
  50. dashedBarLine    $B5
  51. keySignature    $B4 xx (keyMode)
  52. tempoChange    $B3 xxxx (tempoSpeed)
  53. repeatBarEnd    $B2
  54. repeatBarStart    $B1 xxxx (numRepeats)
  55. coda        $B0
  56. musicalNote    xx xx xx  (pitch, unit#, slurStatus)
  57.  
  58. NOTE UNITS:
  59. A "musicalNote" is really either a rest, or a note. Normaly a unit is
  60. a rest, but if it has anything in the pitch field (mentioned above)
  61. then it is a note.  A rest always has $00 in the pitch and slurStatus
  62. fields.
  63.  
  64. unit32        $03    1/32nd rest or note
  65. unit32_3    $02    1/32nd rest or note triplet
  66. unit32_2    none
  67. unit32_1    none
  68. unit16        $06    1/16th rest or note
  69. unit16_3    $04    1/16th rest or note triplet
  70. unit16_2    none
  71. unit16_1    $09    1/16th rest or note, dotted
  72. unit8        $0C    1/8th rest or note
  73. unit8_3        $08    1/8th rest or note triplet
  74. unit8_2        $15    1/8th rest or note, double-dotted
  75. unit8_1        $12    1/8th rest or note, dotted
  76. unit4        $18    1/4th rest or note
  77. unit4_3        $10    1/4th rest or note triplet
  78. unit4_2        $2A    1/4th rest or note, double-dotted
  79. unit4_1        $24    1/4th rest or note, dotted
  80. unit2        $30    1/2 rest or note
  81. unit2_3        $20    1/2 rest or note triplet
  82. unit2_2        $54    1/2 rest or note, double-dotted
  83. unit2_1        $48    1/2 rest or note, dotted
  84. unit1        $60    Whole rest or note
  85. unit1_3        $40    Whole rest or note, triplet
  86. unit1_2        $A8    Whole rest or note, double-dotted
  87. unit1_1        $90    Whole rest or note, dotted
  88.  
  89. (A triplet is a rest/note with a little 3 over it, with playing length
  90. multiplied by 2/3 (shortened).  A double-dotted unit's length is multiplied
  91. by 1 3/4, and a single dotted unit length is multiplied by 1 1/2... if
  92. I am wrong, a good book on musical notation can clear this up!)
  93.  
  94. PITCH:
  95. Pitch values range from "C0" (lower C, at the bottom of the scale) up to
  96. "C6" (upper C, at the top of the scale).. and are represented by the
  97. numbers $01-$2B (1-43).
  98. Accidentals: If the pitch value has $40 added to it, then it is "flat".
  99. If it is "sharp", it has $80 added.
  100.  
  101. SLUR STATUS:
  102. The slur is that little curvy line that links two notes together and "slurs"
  103. them together at playtime.  Here are the byte values:
  104.  
  105. $00    No slur on this note
  106. $01    Slur start/line curving from this note toward one on the right
  107. $02    Slur end/line coming from a note to the left
  108. $03    Slur joint (two slur lines coming from both left and right)
  109.  
  110. (There are other codes that go here too.. sometimes a note has a little
  111. letter floating over it.  I still have yet to decode these variations.)
  112.  
  113. BAR LINE:
  114. This byte represents the vertical bar line that marks the end of a measure.
  115. I'm not sure what a dashed bar line is for!
  116.  
  117. ENDING:
  118. An "ending" command is followed by the number that the ending is repeated,
  119. ranging from 1-10 ($01-$0A)
  120.  
  121. REPEAT BAR:
  122. The Command byte is followed by a word-length number representing the number
  123. of times to repeat the following notes.  The repeated section is terminated
  124. by the next instance of a "repeatBarEnd" command.
  125.  
  126. TIME SIGNATURE:
  127. The "timeSignature" command is followed by bytes representing the top and
  128. bottom of the time signature, respectivly.
  129.  
  130. KEY SIGNATURE:
  131. The key signature command is followed by codes representing the following
  132. modes of the notes that follow:
  133.  
  134. Value    Key        Number to add to pitch-bytes of notes following
  135. $00    C Major        $00
  136. $01    G Major        $00
  137. $02    D Major        $80
  138. $03    A Major        $80
  139. $04    E Major        $80
  140. $05    B Major        $80
  141. $06    F Sharp Major    $80
  142. $07    C Sharp Major    $80
  143. $08    F Major        $00
  144. $09    B flat Major    $00
  145. $0A    E flat Major    $00
  146. $0B    A flat Major    $00
  147. $0C    D flat Major    $00
  148. $0D    G flat Major    $40
  149.             (note: dont add this value if the note already has
  150.             a sharp or a flat)
  151.  
  152. TEMPO CHANGE:
  153. A tempo change command byte is followed by a word-length value representing
  154. the new tempo speed, ranging (in decimal) from 10-450.
  155.  
  156. CODA
  157. A coda is a byte representing the end of a track.  If a track is empty,
  158. the coda byte holds it's place.  Since the file ends with the end of the
  159. 6th track, there will always be at least one $B0 at the end of the file.
  160.  
  161.  
  162. SUPER STUDIO SESSION SONG FILE FORMAT (Editor version 2.1)
  163. ----------------------------------------------------------
  164. The only real difference between verion 1 and 2 is the addition of two more
  165. tracks, for a total of eight.  The second two are represented just like
  166. the 1st six, with $B0 bytes as ending markers.  There is also one additional
  167. command:
  168.  
  169. VOLUME:
  170. The volume command is represented by (hex) byte $BF, with a word-length
  171. value following, and 3 bytes after that which I havn't figured out.
  172. Volume always defaults at "fff" (loudest).  "ppp" is the softest volume.
  173.  
  174. BF xxxx xx xx xx    Volume
  175.  
  176. BF 0000 58 88 9A    ppp
  177. BF 0001 12 40 80    pp
  178. BF 0002 12 40 80    p
  179. BF 0003 12 40 80    mp
  180. BF 0004 58 88 9A    mf
  181. BF 0005 12 40 80    f
  182. BF 0006 58 88 9A    ff
  183. BF 0007 58 88 9A    fff
  184.  
  185. Editor version 2 also places a (incremental) number above most bar lines,
  186. but this has nothing to do with the file format.
  187.  
  188.  
  189. (SUPER) STUDIO SESSION INSTRUMENT FILES (From Bogus Prod. Docs)
  190. ---------------------------------------------------------------
  191. The format of instrument files is very simple.  The samples are eight bit
  192. unsigned samples (silence =128).  There is an eight byte header with the
  193. following format followed by the samples themselves.  
  194.  
  195. No. Bytes    Description
  196.  
  197. 2        Loop Start: byte offset of loop start
  198. 2        Loop End:  byte offset of loop end
  199. 1        Recorded pitch:  #37 is middle C
  200. 1        0:  reserved
  201. 2        Length in bytes
  202. n        The samples
  203.  
  204. Note:  If loopback is used, there must be at least 370 samples after the
  205. loop end.
  206.  
  207. For more information, look at "Flute mid" in SoundEdit(tm) and then look at
  208. the binary version of the file with any file utility.
  209. Note:  some older files are compressed on disk so they won't follow the above
  210. description and some files have "0" for the pitch which implies middle C.
  211.  
  212. (Special Note: This file format is basicly the origional Macintosh "Sound Cap"
  213. and SoundEdit recorded instrument format (Type/Creator: 'DEWF'/'FSSC' or
  214. 'DEWF'/'SFX!') respectivly. - JH )
  215.  
  216. The SoundEdit manual has a good explanation of sampling techniques.
  217. SoundEdit will create Super Studio Session(tm) or Jam Session(tm) instrument
  218. files or convert them from most other formats.
  219.  
  220.  
  221.     Bogas Productions
  222.     751 Laurel Street, #213
  223.     San Carlos, California  94070
  224.     Phone:    (415) 592-5129
  225.     Fax:    (415) 592-5196
  226.  
  227. (April, 1992)
  228. ---
  229.