home *** CD-ROM | disk | FTP | other *** search
/ Guia CD-ROM 25 / GUIACD25.iso / musicbox / rehscore.dxr / 00023.ls < prev    next >
Encoding:
Text File  |  1996-06-28  |  4.9 KB  |  234 lines

  1. on startTrack
  2.   global instrument, tune, speed
  3.   set cNum to 0
  4.   if tune = 3 then
  5.     if instrument = 7 then
  6.       if speed = 10 then
  7.         set cNum to 130
  8.       else
  9.         set cNum to 131
  10.       end if
  11.     else
  12.       if instrument = 8 then
  13.         if speed = 10 then
  14.           set cNum to 132
  15.         else
  16.           set cNum to 133
  17.         end if
  18.       else
  19.         if instrument = 9 then
  20.           if speed = 10 then
  21.             set cNum to 134
  22.           else
  23.             set cNum to 135
  24.           end if
  25.         end if
  26.       end if
  27.     end if
  28.   else
  29.     if tune = 4 then
  30.       if instrument = 7 then
  31.         if speed = 10 then
  32.           set cNum to 140
  33.         else
  34.           set cNum to 141
  35.         end if
  36.       else
  37.         if instrument = 8 then
  38.           if speed = 10 then
  39.             set cNum to 142
  40.           else
  41.             set cNum to 143
  42.           end if
  43.         else
  44.           if instrument = 9 then
  45.             if speed = 10 then
  46.               set cNum to 144
  47.             else
  48.               set cNum to 145
  49.             end if
  50.           end if
  51.         end if
  52.       end if
  53.     else
  54.       if tune = 5 then
  55.         if instrument = 7 then
  56.           if speed = 10 then
  57.             set cNum to 150
  58.           else
  59.             set cNum to 151
  60.           end if
  61.         else
  62.           if instrument = 8 then
  63.             if speed = 10 then
  64.               set cNum to 152
  65.             else
  66.               set cNum to 153
  67.             end if
  68.           else
  69.             if instrument = 9 then
  70.               if speed = 10 then
  71.                 set cNum to 154
  72.               else
  73.                 set cNum to 155
  74.               end if
  75.             end if
  76.           end if
  77.         end if
  78.       end if
  79.     end if
  80.   end if
  81.   if cNum = 0 then
  82.     exit
  83.   end if
  84.   puppetSprite(20, 1)
  85.   set the castNum of sprite 20 to cNum
  86.   updateStage()
  87.   set the movieTime of sprite 20 to 0
  88.   set the movieRate of sprite 20 to 1
  89. end
  90.  
  91. on stopTrack
  92.   set whichCast to the castNum of sprite 20
  93.   if whichCast = 0 then
  94.     exit
  95.   end if
  96.   if the castType of cast whichCast <> #digitalVideo then
  97.     exit
  98.   end if
  99.   set the movieRate of sprite 20 to 0
  100.   set the visible of sprite 10 to 0
  101.   set the visible of sprite 11 to 0
  102.   puppetSprite(20, 0)
  103. end
  104.  
  105. on showFingering
  106.   set hpos to the mouseH
  107.   set hpos to hpos - the left of sprite 16
  108.   set num to hpos / 22
  109.   set the visible of sprite (17 + num) to 1
  110.   repeat with chan = 0 to 21
  111.     if chan <> num then
  112.       set the visible of sprite (17 + chan) to 0
  113.     end if
  114.   end repeat
  115.   moveMask(num)
  116. end
  117.  
  118. on moveMask pos
  119.   set notePos to list(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 15, 37, 63, 82, 103, 125, 150, 169, 191)
  120.   put pos
  121.   if pos > 21 then
  122.     exit
  123.   end if
  124.   set loc to getAt(notePos, pos + 1)
  125.   set the castNum of sprite 2 to 75 + pos
  126.   set the locH of sprite 2 to 320 + loc
  127.   updateStage()
  128. end
  129.  
  130. on stopMovie
  131.   stopTrack()
  132. end
  133.  
  134. on chooseTrack
  135.   global instrument, tune, speed
  136.   stopTrack()
  137.   set cNum to 0
  138.   if tune = 3 then
  139.     if instrument = 7 then
  140.       if speed = 10 then
  141.         set cNum to 130
  142.       else
  143.         set cNum to 131
  144.       end if
  145.     else
  146.       if instrument = 8 then
  147.         if speed = 10 then
  148.           set cNum to 132
  149.         else
  150.           set cNum to 133
  151.         end if
  152.       else
  153.         if instrument = 9 then
  154.           if speed = 10 then
  155.             set cNum to 134
  156.           else
  157.             set cNum to 135
  158.           end if
  159.         end if
  160.       end if
  161.     end if
  162.   else
  163.     if tune = 4 then
  164.       if instrument = 7 then
  165.         if speed = 10 then
  166.           set cNum to 140
  167.         else
  168.           set cNum to 141
  169.         end if
  170.       else
  171.         if instrument = 8 then
  172.           if speed = 10 then
  173.             set cNum to 142
  174.           else
  175.             set cNum to 143
  176.           end if
  177.         else
  178.           if instrument = 9 then
  179.             if speed = 10 then
  180.               set cNum to 144
  181.             else
  182.               set cNum to 145
  183.             end if
  184.           end if
  185.         end if
  186.       end if
  187.     else
  188.       if tune = 5 then
  189.         if instrument = 7 then
  190.           if speed = 10 then
  191.             set cNum to 150
  192.           else
  193.             set cNum to 151
  194.           end if
  195.         else
  196.           if instrument = 8 then
  197.             if speed = 10 then
  198.               set cNum to 152
  199.             else
  200.               set cNum to 153
  201.             end if
  202.           else
  203.             if instrument = 9 then
  204.               if speed = 10 then
  205.                 set cNum to 154
  206.               else
  207.                 set cNum to 155
  208.               end if
  209.             end if
  210.           end if
  211.         end if
  212.       end if
  213.     end if
  214.   end if
  215.   return cNum
  216. end
  217.  
  218. on dump
  219.   repeat with chan = 3 to 24
  220.     put the locH of sprite chan - 320
  221.   end repeat
  222. end
  223.  
  224. on changeReg
  225.   repeat with cNum = 75 to 75 + 21
  226.     set regH to the locH of the regPoint of cast cNum
  227.     set regV to the locV of the regPoint of cast cNum
  228.     put the regPoint of cast cNum
  229.     set newReg to point(regH, 240)
  230.     put newReg
  231.     set the regPoint of cast cNum to newReg
  232.   end repeat
  233. end
  234.