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 / 00067.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  2.2 KB  |  59 lines

  1. on mouseUp
  2.   global gArp, gProg, gPath, gBlue, loadSynthList, delSynthList, synthList, progList
  3.   if (line the mouseLine of field "fieldElencoSynthCD" <> EMPTY) and (the number of words in line the mouseLine of field "fieldElencoSynthCD" = 1) then
  4.     set linea to the mouseLine
  5.     if the name of member the memberNum of sprite 8 = "Hpreview" then
  6.       set the memberNum of sprite 8 to the number of member "preview"
  7.       updateStage()
  8.       IKSynthStop()
  9.       if synthList <> [] then
  10.         case char 1 of gArp of
  11.           "[":
  12.             set arp to 1
  13.           "]":
  14.             set arp to 2
  15.           "{":
  16.             set arp to 4
  17.           "}":
  18.             set arp to 8
  19.         end case
  20.         IKSetSynth(gPath & "Synth\" & field "fieldSynth" & "\")
  21.         IKSynthArp(getPos(progList, gProg) - 1, arp, createSeq())
  22.       end if
  23.     end if
  24.     set the foreColor of field "fieldElencoSynth" to 0
  25.     set delSynthList to []
  26.     if the controlDown then
  27.       set the foreColor of line linea of field "fieldElencoSynthCD" to gBlue
  28.       append(loadSynthList, line linea of field "fieldElencoSynthCD")
  29.     else
  30.       if the shiftDown then
  31.         if loadSynthList = [] then
  32.           set the foreColor of line linea of field "fieldElencoSynthCD" to gBlue
  33.           set loadSynthList to [line linea of field "fieldElencoSynthCD"]
  34.         else
  35.           set ultimo to getLast(loadSynthList)
  36.           repeat with i = 1 to the number of lines in field "fieldElencoSynthCD"
  37.             if line i of field "fieldElencoSynthCD" = ultimo then
  38.               exit repeat
  39.             end if
  40.           end repeat
  41.           set a to i
  42.           set b to linea
  43.           set start to min(a, b)
  44.           set end to max(a, b)
  45.           deleteAt(loadSynthList, count(loadSynthList))
  46.           repeat with i = start to end
  47.             set the foreColor of line i of field "fieldElencoSynthCD" to gBlue
  48.             append(loadSynthList, line i of field "fieldElencoSynthCD")
  49.           end repeat
  50.         end if
  51.       else
  52.         set the foreColor of member "fieldElencoSynthCD" to 0
  53.         set the foreColor of line linea of field "fieldElencoSynthCD" to gBlue
  54.         set loadSynthList to [line linea of field "fieldElencoSynthCD"]
  55.       end if
  56.     end if
  57.   end if
  58. end
  59.