home *** CD-ROM | disk | FTP | other *** search
/ Computer Music Interactif 7 / cd.iso / pc / PC / Demos / GroovMak / data1.cab / Program_Executable_Files / Media / OpenS.dxr / 00061.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  1.3 KB  |  43 lines

  1. on mouseDown
  2.   global loadSynthList, delSynthList
  3.   if (count(loadSynthList) = 1) or (count(delSynthList) = 1) then
  4.     repeat while the mouseDown
  5.       set the memberNum of sprite the clickOn to the number of member "Hpreview"
  6.       updateStage()
  7.     end repeat
  8.   end if
  9. end
  10.  
  11. on mouseUp
  12.   global gPath, gArp, gProg, gPosVolSynth, gPosPanSynth, gPathSynth, loadSynthList, delSynthList, progList, synthList
  13.   if (count(loadSynthList) = 1) or (count(delSynthList) = 1) then
  14.     set the memberNum of sprite the clickOn to the number of member "Hpreview"
  15.     updateStage()
  16.     if count(loadSynthList) = 1 then
  17.       set synth to getAt(loadSynthList, 1)
  18.       IKSetSynth(gPathSynth & synth & "\")
  19.     else
  20.       set synth to getAt(delSynthList, 1)
  21.       IKSetSynth(gPath & "Synth\" & synth & "\")
  22.     end if
  23.     IKSynthStop()
  24.     case char 1 of gArp of
  25.       "[":
  26.         set arp to 1
  27.       "]":
  28.         set arp to 2
  29.       "{":
  30.         set arp to 4
  31.       "}":
  32.         set arp to 8
  33.     end case
  34.     IKSynthVolume(integer(128 * (-gPosVolSynth + 54) / 45))
  35.     IKSynthPan(integer(128 * (-gPosPanSynth + 54) / 45))
  36.     if synthList <> [] then
  37.       IKSynthArp(getPos(progList, gProg) - 1, arp, createSeq())
  38.     else
  39.       IKSynthArp(getPos(progList, gProg) - 1, arp, "C1D1E1F1G1A1B1C2D2E2F2G2A2B2C3D3E3F3G3A3B3")
  40.     end if
  41.   end if
  42. end
  43.