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 / 00178.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  1.5 KB  |  60 lines

  1. on mouseEnter
  2.   if the visible of window "Help" then
  3.     tell window "help"
  4.       go("synth15")
  5.     end tell
  6.   end if
  7. end
  8.  
  9. on mouseLeave
  10.   if the visible of window "Help" then
  11.     tell window "help"
  12.       go("start")
  13.     end tell
  14.   end if
  15. end
  16.  
  17. on mouseDown
  18.   global gOn, valore, gBlue, arpList, folderSynthList
  19.   if gOn and (folderSynthList <> []) and not (the visible of window "help") then
  20.     set valore to getPos(arpList, field "fieldArp")
  21.     set start to the mouseV
  22.     repeat while the mouseDown
  23.       set temp to the mouseV - start
  24.       set temp to abs(((valore + temp) mod count(arpList)) + 1)
  25.       if temp = 0 then
  26.         set temp to 1
  27.       end if
  28.       put getAt(arpList, temp) into field "fieldArp"
  29.     end repeat
  30.     set the textFont of member "fieldArp" to "IK10"
  31.     set the foreColor of member "fieldArp" to gBlue
  32.   end if
  33. end
  34.  
  35. on mouseUp
  36.   global gProg, gArp, gOn, gOnSynth, gPosVolSynth, gPosPanSynth, gSynthSel, progList, synthList, folderSynthList
  37.   if gOn and (folderSynthList <> []) and not (the visible of window "help") then
  38.     set gArp to field "fieldArp"
  39.     case char 1 of gArp of
  40.       "[":
  41.         set arp to 1
  42.       "]":
  43.         set arp to 2
  44.       "{":
  45.         set arp to 4
  46.       "}":
  47.         set arp to 8
  48.     end case
  49.     if gOnSynth then
  50.       IKSynthVolume(integer(128 * (-gPosVolSynth + 54) / 45))
  51.       IKSynthPan(integer(128 * (-gPosPanSynth + 54) / 45))
  52.       IKSynthArp(getPos(progList, gProg) - 1, arp, createSeq())
  53.     end if
  54.     if gSynthSel then
  55.       set the locH of sprite 74 to -20
  56.       set gSynthSel to 0
  57.     end if
  58.   end if
  59. end
  60.