home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / amfm / amfm11 / utilities / prorun / prorunner.doc.pp / prorunner.doc
Text File  |  1994-06-20  |  13KB  |  276 lines

  1.  
  2.              -=* PRORUNNER Version 1.0 *=-
  3.      -------------------------------------------------
  4.          * THE ULTIMATE PROTRACKER-REPLAYER *
  5.  
  6.                CODED BY COSMOS OF SANITY
  7.                -------------------------
  8.  
  9.             MAINFILE-MUSIC BY MICROFORCE OF SANITY
  10.  
  11. * USE CURSOR-KEYS TO SCROLL UP/DOWN * PRESS RETURN TO EXIT TO SAVEMENU *
  12.  
  13.  
  14. 1. NOTE:
  15. --------
  16.  
  17. To understand all factors of PRORUNNER perfectly,it is necessary to read
  18. this DOC-file .So if you want to copy the source-text of PRORUNNER on your
  19. pack or compilation or whatever,then please copy the Mainfile on your disk,
  20. because it also contains this documentary.
  21.  
  22. 2. WHY I WROTE PRORUNNER
  23. ------------------------
  24.  
  25. To tell you the reason of my work,I shall have to take you with me a long
  26. way in time: To the beginning of my career as an AMIGA-demo-coder !
  27. At that time a great soundtool made his way through the AMIGA-scene:
  28. THE SOUNDTRACKER ( Version 2.2 ,I think ). I was fascinated by that great
  29. music you were able to compose and decided to get the replayer-routine in
  30. order to include some funky tunes in my demos.To my own surprise I even got
  31. several replayers,all of them complaining to replay modules from
  32. SOUNDTRACKER V2.2 !! But I was never satisfied with the replay-routine I
  33. built in. Most of them were too slow and the rest was a bit faster,but made
  34. some mistakes, which you could easily hear. It seemed to me,that a fast
  35. replayer outcluded a correct replay. As a demo-coder I first wanted to use
  36. one of the fast replayers to gain some rastertime,but the result was,that
  37. the music sounded terribly.Moreover I recognized the disappointment,which
  38. the musician showed,because he had a lot of work with his tune and this 
  39. work seemed to be minimated by a wrong replay. And that was finally the
  40. reason, why I used the slowest ( and most correct ) replayer !
  41. Later versions of SOUNDTRACKER came up with the same problem and even the
  42. first version of NOISETRACKER couldn't solve it. It still took some time,
  43. until NOISETRACKER V2.0 appeared, which was in my eyes a highlight for every
  44. coder because of its very fast 8-rasterlines-replayer ! Some other tools
  45. came up like : NOISEPACKER V1.0 - V3.0 , NOISERUNNER and some other
  46. replayers from several guys .
  47. NOISETRACKER V2.0 dominated the demo-scene for a long time as suddenly a
  48. new,greater,more powerful soundtool showed up: PROTRACKER V1.0 !!
  49. Much more comfortable and with new effects this tool persuaded ( nearly )
  50. every musician. But PROTRACKER V1.0 and later versions ( V1.0A - V2.2a )
  51. had a 'The minimum are 56 frames' - replay-routine,if you know,what I mean.
  52. Soon some rumours went around about a '10-rasterlines-PROTRACKER-replayer',
  53. but that rumours never turned out to be true and so the scene had to wait...
  54. After a long time AZATOTH of PHENOMENA wrote a PROPACKER,which was able to
  55. shorten the module,replay most of the PROTRACKER-effects and the replay was
  56. mostly done in less than 9 rasterlines. It seemed to be musicians' and
  57. coders' heaven as this great tool was released. But it wasn't !!!
  58. In fact some coders intended to include a soundfading-routine in the
  59. PROPACKER-replayer,but they failed,because the replayer was coded too
  60. complicated,so that only AZATOTH would have been able to code a soundfading-
  61. routine. Another problem was,that PROPACKER seemed to have some problems to
  62. convert some PROTRACKER-modules ( e.g. SILENT ATTACK,MYSTIKAL!-VIBES etc. ).
  63. Moreover PROPACKER made some mistakes in replaying TONE PORTAMENTO ( I'll
  64. explain that later ) and some important effects were missing as many
  65. musicians have discovered FUNK REPEAT to let the chip-tunes appear more
  66. synthetic . And to name the last point : In the case you are coding a demo
  67. and you have tested it for 2000 times and you were listening to that same
  68. song 2000 times,it could be,that this song is a bit boring after 2000 times.
  69. But you are coding at the moment and a new PROPACKER-module means :
  70.  
  71. 1. Quit Assembler
  72. 2. Load PROPACKER ( with the exact parameters,otherwise you can type the
  73.    whole line again )
  74. 3. Load Assembler again
  75. 4. Load Sourcetext
  76.  
  77. So loading in a new song very often turned out to be a long procedure. And
  78. for me , the owner of a 105MB Harddisk, 1 MB Chipmem and 2MB Fastmem is it
  79. more comfortable just to type in another modulename in order to load another
  80. PROTRACKER-module.
  81.  
  82. And remembering the good old times ( SOUNDTRACKER V2.2 ) I didn't want to
  83. wait again until a new replay-routine appears and so I tried to code a
  84. replayer for the PROTRACKER,which is very fast,plays all effects and
  85. corrects all mistakes done by PROPACKER. I hope I didn't fail .....
  86.  
  87.  
  88. 3. WHY USING PRORUNNER ?
  89. ------------------------
  90.  
  91. Well,I think,the first advantage is,that PRORUNNER really handles ALL
  92. effects,which you are allowed to use in PROTRACKER V2.2a. I don't want to
  93. mention them,because they are listed up at the beginning of the source-
  94. text.
  95. To explain you the second advantage I have to tell you the situation.
  96. Imagine yourself a channel looking like this:
  97.  
  98.     C-2  1000    ; No Effekt
  99.          0301    ; TONE PORTAMENTO
  100.          0301    ; TONE PORTAMENTO
  101.  
  102. As you can see,the replayer first has to play sample no.1 with the note C-2.
  103. After that he finds neither a note nor a samplenumber,but he shall play
  104. TONE PORTAMENTO. And so do most of the replayers,but they do wrong !!!
  105. Because at the last time,when they played a sample,TONE PORTAMENTO wasn't
  106. included,every following TONE PORTAMENTO ( without any note ) mustn't be
  107. played. And that's a fact PRORUNNER pays attention on.
  108. I admit,that was a very special situation,but if such a situation appears,
  109. you have to replay it as correctly as other situations. I tested PRORUNNER
  110. with lots of modules ( all modules I had on my harddisk ) and some special-
  111. written modules to confrontate the replayer with abnormal situations
  112. ( e.g. several loops ( one in another ) on several channels ) and I hope,
  113. that I have removed all bugs now, but who knows ?
  114. The third advantage is ( in my eyes ),that PRORUNNER replays NORMAL
  115. PROTRACKER-MODULES. That means: If you are coding and you want to listen to
  116. another music,then you just have to type in another modulename. NO
  117. COMPLICATED PROCEDURES TO PACK ANOTHER MODULE -> JUST ANOTHER MODULENAME !!!
  118. The fourth advantage is,that in the sourcetext of PRORUNNER a musicfade-
  119. routine is already implemented . I'll explain later how to handle it.
  120. The finally last advantage is the fact, that PRORUNNER is the first replayer,
  121. which is coded totally PC-relative ! That means,you can copy PRORUNNER freely
  122. through the whole memory,it will always play the music correctly ( At least
  123. I hope so. I tried it myself and it worked fine. And pay attention: If you
  124. copy PRORUNNER from $30000 to $80000 and you call the Init-Routine at $30000
  125. and the Replay-Routine at $80000, then PRORUNNER obviously can't replay the
  126. music ).
  127.  
  128. 4. HOW TO USE PRORUNNER
  129. -----------------------
  130.  
  131. I.  Write the address of your module to the label 'pr_module'.To give you an
  132.     example:        move.l    #moduleaddress,pr_module
  133.  
  134. II. Write the number of the startposition to the label 'pr_startposition'.
  135.     A short example:    move.w    #45,pr_startposition
  136.     If the startposition is 0, you can of course leave that point.If the
  137.     number of the startposition is too high, then it will be automatically
  138.     set to 0 !  I just implemented this option as i saw some modules,which
  139.     were 2 songs in 1.That means,they used the same instruments and the
  140.     patterns of song 1 were followed by the patterns of song 2. To ease the
  141.     coder's attempt to start the second song i implemented that option,maybe
  142.     you can use it.
  143.  
  144. III.After that you can call the subroutine 'pr_init'. I will later explain
  145.     a bit more to the Init-routine.
  146.  
  147. IV. Call the subroutine 'pr_music' once in every frame to replay the module.
  148.     Please remark,that PRORUNNER can only replay the samples,when the
  149.     DMA-Mainbit ( Bit No.9 ) is set and the Interrupts are allowed ( that's
  150.     because PRORUNNER works with LEVEL 6-Interrupt ).
  151.  
  152. V.  To end the song,call the subroutine 'pr_end',which will close all music-
  153.     channels.
  154.  
  155. REMARK : The PRORUNNER Init-Routine converts the PROTRACKER-module in an
  156.      own format and replaces the four letters 'M.K.' by 'SNT.' This
  157.      converting will surely take some time,but it needs max. 1 second.
  158. As I know,that many of the coders read their datas ( gfx,music ) in
  159. MASTERSEKA or ASMOne with '>extern' once to thier addresses and assemble
  160. their code to another part of the memory,I built in the option,that
  161. PRORUNNER recognizes an already converted module ( signed by 'SNT.' ) and
  162. doesn't convert it again,so that these coders don't have to read in the whole
  163. external datas every time they assemble their code.
  164.  
  165.  
  166. 5. HOW TO USE THE MUSIC-FADE-ROUTINE
  167. ------------------------------------
  168.  
  169. This routine works with 2 labels:    pr_musicfadect
  170.                     pr_musicfadedirection
  171.  
  172. pr_musicfadect:        It is the counter to fade the music.It runs from
  173.             0 to 64.Value at the beginning is 64.
  174. pr_musicfadedirection:    This gives you the direction you want to fade your
  175.             music to.Two Possibilities are sensible:
  176.  
  177.      1 = Add 1 to pr_musicfadect in every frame
  178.     -1 = Sub 1 from pr_musicfadect in every frame
  179.  
  180. Higher values would fade the music away too fast.By the way: If the counter
  181. 'pr_musicfadect' reaches the values 0 or 64,then pr_musicfadedirection will
  182. be automatically set to 0 !! Anyway. Here are two examples for fading:
  183.  
  184. a) Start of Demo: Fade Music in.
  185.                         ; Fadecounter is still 64
  186.     clr.w    pr_musicfadect            ; Set Fadecounter to 0
  187.     move.w    #1,pr_musicfadedirection    ; Fade Music in
  188.  
  189. b) End of Demo : Fade Music out.
  190.  
  191.                         ; Counter is still set on 64
  192.     move.w    #-1,pr_musicfadedirection    ; Fade Music out
  193.  
  194. Easy,isn't it ? And the PRORUNNER-Musicfade-routine really fades all
  195. channels correctly, no matter, if a longer sample is played without any
  196. effects or if some volume-effects ( e.g. tremolo,volume-slide etc. ) are
  197. played.
  198.  
  199.  
  200. 6. HOW FAST IS PRORUNNER ?
  201. --------------------------
  202.  
  203. Well,it of course depends on the effects you are using. I tested it ( as
  204. mentioned above ) with lots of modules and I have to say,that PRORUNNER
  205. never needed more than 8 RASTERLINES,but many complicated effects together
  206. with FUNK REPEAT can surely push it up to 9 or even 10 RASTERLINES ( e.g.
  207. Using VIBRATO+VOLUME SLIDE together with FUNK REPEAT on all 4 channels could
  208. cost 10 RASTERLINES ).
  209. A problem in the replayer is the musicfade-routine,because it uses 4 MULUs,
  210. which surely take their rastertime.The problem is,that in most of the demos
  211. no fading of the music is needed. In that case you can remove the musicfade-
  212. routine to gain a bit more rastertime.Normally the source-text should look
  213. like this:
  214.  
  215.     .    ;   \
  216.     .    ;    \
  217.     .    ;     \ Header of
  218.     .    ;     / PRORUNNER
  219.     .    ;    /
  220.     .    ;   /
  221. YES            EQU    1
  222. NO            EQU    0
  223. INCLUDEFADINGROUTINE    EQU    YES
  224.  
  225. There you just have to change the last line in:
  226.  
  227. INCLUDEFADINGROUTINE    EQU    NO
  228.  
  229. The Assembler now assembles the PRORUNNER-routine automatically without the
  230. musicfade-routine and its labels 'pr_musicfadect' and 'pr_musicfade-
  231. direction'.
  232.  
  233. Just some words to the speed of PRORUNNER: Some effects ( e.g. ARPEGGIO,
  234.                        GLISSANDO ) I speeded up a lot.
  235. The problem of ARPEGGIO and GLISSANDO was for the replayer,that it had to
  236. look through a periodtable until it found the value it searched for. That
  237. meant : Even PROPACKER ( which is really a fast replayer ) needed up to 19
  238. RASTERLINES ,when you played ARPEGGIO on all channels. PRORUNNER indeed
  239. uses a shorter,but exact(!) method to play ARPEGGIO,so that ARPEGGIO on all
  240. channels ( without FUNKREPEAT ofcourse ) takes not more than 7 RASTERLINES
  241. ( 6 RASTERLINES, when you switch the musicfade-routine off ) !!
  242.  
  243.  
  244. 7. IMPORTANT
  245. ------------
  246.  
  247. As I tested PRORUNNER,I also took some older NOISETRACKER-modules, which
  248. have a bit different song-format from PROTRACKER-modules. I heard a
  249. little difference,because PRORUNNER calculated wrong startaddresses for the
  250. samples. I loaded PROTRACKER , read in the module and saved it again. And
  251. as I started PRORUNNER again,it replayed the module in a correct way.
  252. So if you want to replay old NOISETRACKER-modules, then you first have to
  253. save them under PROTRACKER. Otherwise it can be, that PRORUNNER makes
  254. trouble in replaying the module.
  255.  
  256.  
  257. 8. SOME LAST WORDS
  258. ------------------
  259.  
  260. Yep. Some last words have to be said. I hope, that for some guys out there
  261. I was able to solve the 'replayer-problem', that I was able to help you.
  262. In the case,that you've found a bug in the replayer or if you want to write
  263. or call me for any reason, here's my address and phonenumber:
  264.  
  265.  
  266.                COSMOS of SANITY
  267.  
  268.                   MARC HEYL
  269.             ROBERT-KOCH-STRASSE 4
  270.               6650 HOMBURG-SAAR
  271.                    GERMANY
  272.              TEL. 06841 / 65164
  273.  
  274.  
  275. ****************************************************************************
  276.