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 / 00068.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  2.4 KB  |  63 lines

  1. on mouseUp
  2.   global gArp, gPath, gProg, gBlue, delSynthList, loadSynthList, synthList, progList
  3.   if (line the mouseLine of field "fieldElencoSynth" <> EMPTY) and (the number of words in line the mouseLine of field "fieldElencoSynth" = 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 "fieldElencoSynthCD" to 0
  25.     set loadSynthList to []
  26.     if the controlDown then
  27.       set the foreColor of line linea of field "fieldElencoSynth" to gBlue
  28.       if not getPos(delSynthList, line linea of field "fieldElencoSynth") then
  29.         append(delSynthList, line linea of field "fieldElencoSynth")
  30.       end if
  31.     else
  32.       if the shiftDown then
  33.         if delSynthList = [] then
  34.           set the foreColor of line linea of field "fieldElencoSynth" to gBlue
  35.           set delSynthList to [line linea of field "fieldElencoSynth"]
  36.         else
  37.           set ultimo to getLast(delSynthList)
  38.           repeat with i = 1 to the number of lines in field "fieldElencoSynth"
  39.             if line i of field "fieldElencoSynth" = ultimo then
  40.               exit repeat
  41.             end if
  42.           end repeat
  43.           set a to i
  44.           set b to linea
  45.           set start to min(a, b)
  46.           set end to max(a, b)
  47.           deleteAt(delSynthList, count(delSynthList))
  48.           repeat with i = start to end
  49.             set the foreColor of line i of field "fieldElencoSynth" to gBlue
  50.             if not getPos(delSynthList, line i of field "fieldElencoSynth") then
  51.               append(delSynthList, line i of field "fieldElencoSynth")
  52.             end if
  53.           end repeat
  54.         end if
  55.       else
  56.         set the foreColor of member "fieldElencoSynth" to 0
  57.         set the foreColor of line linea of field "fieldElencoSynth" to gBlue
  58.         set delSynthList to [line linea of field "fieldElencoSynth"]
  59.       end if
  60.     end if
  61.   end if
  62. end
  63.