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 / 00179.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  2.3 KB  |  77 lines

  1. on mouseEnter
  2.   if the visible of window "Help" then
  3.     tell window "help"
  4.       go("synth7")
  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, gBlue, folderSynthList, valore, synth
  19.   if gOn and (folderSynthList <> []) and not (the visible of window "help") then
  20.     set valore to getPos(folderSynthList, field "fieldSynth")
  21.     set start to the mouseV
  22.     set the textFont of member "fieldSynth" to "IK10"
  23.     set the foreColor of member "fieldSynth" to gBlue
  24.     repeat while the mouseDown
  25.       set synth to the mouseV - start
  26.       set synth to abs(((valore + synth) mod count(folderSynthList)) + 1)
  27.       if synth = 0 then
  28.         set synth to 1
  29.       end if
  30.       set the textFont of member "fieldSynth" to "IK10"
  31.       set the foreColor of member "fieldSynth" to gBlue
  32.       put getAt(folderSynthList, synth) into field "fieldSynth"
  33.     end repeat
  34.     set the textFont of member "fieldSynth" to "IK10"
  35.     set the foreColor of member "fieldSynth" to gBlue
  36.   end if
  37. end
  38.  
  39. on mouseUp
  40.   global gPath, gProg, gArp, gOnSynth, gOn, gPosVolSynth, gPosPanSynth, gSynthSel, gBlue, progList, folderSynthList, synthList, valore, synth
  41.   if gOn and (folderSynthList <> []) then
  42.     if valore = synth then
  43.       set pos to getPos(folderSynthList, field "fieldSynth") + 1
  44.       if pos <> (count(folderSynthList) + 1) then
  45.         put getAt(folderSynthList, pos) into field "fieldSynth"
  46.       else
  47.         put getAt(folderSynthList, 1) into field "fieldSynth"
  48.       end if
  49.     end if
  50.     if gOnSynth then
  51.       IKSynthStop()
  52.     end if
  53.     IKSetSynth(gPath & "Synth\" & field "fieldSynth" & "\")
  54.     case char 1 of gArp of
  55.       "[":
  56.         set arp to 1
  57.       "]":
  58.         set arp to 2
  59.       "{":
  60.         set arp to 4
  61.       "}":
  62.         set arp to 8
  63.     end case
  64.     IKSynthVolume(integer(128 * (-gPosVolSynth + 54) / 45))
  65.     IKSynthPan(integer(128 * (-gPosPanSynth + 54) / 45))
  66.     if synthList <> [] then
  67.       IKSynthArp(getPos(progList, gProg) - 1, arp, createSeq())
  68.     end if
  69.     if gSynthSel then
  70.       set the locH of sprite 74 to -20
  71.       set gSynthSel to 0
  72.     end if
  73.     set the textFont of member "fieldSynth" to "IK10"
  74.     set the foreColor of member "fieldSynth" to gBlue
  75.   end if
  76. end
  77.