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

  1. on clickLed
  2.   global gOn, gArp, gProg, gOnSynth, gPosVolSynth, gPosPanSynth, gSynthSel, gPath, synthList, progList, folderSynthList
  3.   if gOn and (IKGetCurrentBeat() <> -1) and (folderSynthList <> []) and not (the visible of window "help") then
  4.     if gOnSynth then
  5.       set gOnSynth to 0
  6.       IKSynthStop()
  7.     else
  8.       IKSetSynth(gPath & "Synth\" & field "fieldSynth" & "\")
  9.       if synthList <> [] then
  10.         set the visible of sprite 3 to 0
  11.         case char 1 of gArp of
  12.           "[":
  13.             set arp to 1
  14.           "]":
  15.             set arp to 2
  16.           "{":
  17.             set arp to 4
  18.           "}":
  19.             set arp to 8
  20.         end case
  21.         IKSynthVolume(integer(128 * (-gPosVolSynth + 54) / 45))
  22.         IKSynthPan(integer(128 * (-gPosPanSynth + 54) / 45))
  23.         IKSynthArp(getPos(progList, gProg) - 1, arp, createSeq())
  24.         set gOnSynth to 1
  25.         if gSynthSel then
  26.           set the locH of sprite 74 to -20
  27.           set gSynthSel to 0
  28.         end if
  29.       end if
  30.     end if
  31.   end if
  32. end
  33.