home *** CD-ROM | disk | FTP | other *** search
Wrap
on mouseEnter if the visible of window "Help" then tell window "help" go("seq1") end tell end if end on mouseLeave if the visible of window "Help" then tell window "help" go("start") end tell end if end on mouseDown global gPlaySeq, mov if not gPlaySeq and not (the visible of window "help") then if chars(the name of member the memberNum of sprite the clickOn, 1, 2) <> "gr" then if count(markerList) = 25 then set mov to 0 openWin("Message") tell window "Message" go("8") end tell else set mov to 1 set the loc of sprite 48 to point(800, 800) set the memberNum of sprite 48 to the number of member the memberNum of sprite the clickOn set the ink of sprite 48 to 36 set the visible of sprite the clickOn to 0 repeat while the mouseDown set the locH of sprite 48 to the mouseH set the locV of sprite 48 to the mouseV updateStage() end repeat end if end if end if end on mouseUp global gfirstmarker, glastmarker, gPlaySeq, gCont, gBlue, markerList, mov if not gPlaySeq and mov and not (the visible of window "help") then set interseca to 0 repeat with i = 2 to 9 if sprite 48 intersects sprite(i) then set interseca to 1 exit repeat end if end repeat if interseca and (count(markerList) < 25) then set new to "g" & chars(the name of member the memberNum of sprite the clickOn, 2, length(the name of member the memberNum of sprite the clickOn)) set num to integer(chars(the name of member the memberNum of sprite the clickOn, 2, length(the name of member the memberNum of sprite the clickOn))) case the clickOn of 11: set the loc of sprite the clickOn to point(191, 134) 12: set the loc of sprite the clickOn to point(215, 126) 13: set the loc of sprite the clickOn to point(238, 120) 14: set the loc of sprite the clickOn to point(259, 114) 15: set the loc of sprite the clickOn to point(282, 111) 16: set the loc of sprite the clickOn to point(305, 107) 17: set the loc of sprite the clickOn to point(328, 105) 18: set the loc of sprite the clickOn to point(351, 106) end case set the visible of sprite the clickOn to 1 if markerList = [] then set the memberNum of sprite 2 to the number of member new append(markerList, num) set gfirstmarker to 1 set glastmarker to 1 else if the name of member the memberNum of sprite i = "marker" then append(markerList, num) set j to 1 repeat with i = gfirstmarker to 7 + gfirstmarker set j to j + 1 if i > count(markerList) then exit repeat next repeat end if set gN to "g" & getAt(markerList, i) set the memberNum of sprite j to the number of member gN set glastmarker to i end repeat if the name of member the memberNum of sprite 9 <> "marker" then repeat with k = 2 to 8 set the memberNum of sprite k to the number of member the memberNum of sprite (k + 1) updateStage() end repeat set the memberNum of sprite 9 to the number of member "marker" updateStage() set gfirstmarker to gfirstmarker + 1 end if else addAt(markerList, gfirstmarker + i - 2, num) set j to 1 repeat with i = gfirstmarker to 7 + gfirstmarker set j to j + 1 if i > count(markerList) then exit repeat next repeat end if set gN to "g" & getAt(markerList, i) set the memberNum of sprite j to the number of member gN set glastmarker to i end repeat end if end if set the memberNum of sprite 48 to 1000 updateStage() if markerList <> [] then put EMPTY into field "fieldMarkerSeq" repeat with m = 1 to count(markerList) put getAt(markerList, m) & " " after field "fieldMarkerSeq" end repeat end if case word 2 of field "fieldDuration" of "sec": set sec to 1920 * the number of words in field "fieldMarkerSeq" / float(field "fieldBpm") set sec to integer(sec) set min to sec / 60 if min = 0 then set min to "00" end if if (min >= 1) and (min <= 9) then set min to "0" & min end if set sec to sec mod 60 if sec = 0 then set sec to "00" end if if (sec >= 1) and (sec <= 9) then set sec to "0" & sec end if put min & ":" & sec & " sec" into field "fieldDuration" otherwise: put 8 * the number of words in field "fieldMarkerSeq" & " bars" into field "fieldDuration" end case set the textFont of member "fieldDuration" to "IK10" set the foreColor of member "fieldDuration" to gBlue set the textFont of member "fieldMarkerSeq" to "Arial" set the textSize of member "fieldMarkerSeq" to 10 set the foreColor of member "fieldMarkerSeq" to 0 else case the clickOn of 11: set the loc of sprite the clickOn to point(191, 134) 12: set the loc of sprite the clickOn to point(215, 126) 13: set the loc of sprite the clickOn to point(238, 120) 14: set the loc of sprite the clickOn to point(259, 114) 15: set the loc of sprite the clickOn to point(282, 111) 16: set the loc of sprite the clickOn to point(305, 107) 17: set the loc of sprite the clickOn to point(328, 105) 18: set the loc of sprite the clickOn to point(351, 106) end case set the visible of sprite the clickOn to 1 updateStage() end if end if set the editable of member "fieldBpm" to 0 end on rightMouseUp global gGrooveSel, gPlaySeq, gPath, gOnSynth, gBlue, stateTrackList, virTracklIst, volValList, panValList, volPosList, panPosList, audioList if not gPlaySeq then if chars(the name of member the memberNum of sprite the clickOn, 1, 2) <> "gr" then case char 1 of the name of member the memberNum of sprite the clickOn of "H": set gGrooveSel to 0 set gN to "g" & chars(the name of member the memberNum of sprite the clickOn, 2, length(the name of member the memberNum of sprite the clickOn)) set the memberNum of sprite the clickOn to the number of member gN IKSynthStop() set gOnSynth to 0 IKStop() IKFunction() set stateTrackList to ["off", "off", "off", "off", "off", "off", "off", "off"] set virTracklIst to [-1, -1, -1, -1, -1, -1, -1, -1] set volValList to [28, 28, 28, 28, 28, 28, 28, 28] set volPosList to [239, 239, 239, 239, 239, 239, 239, 239] set panValList to [64, 64, 64, 64, 64, 64, 64, 64] set panPosList to [239, 239, 239, 239, 239, 239, 239, 239] put EMPTY into field "fieldState" "g": if gGrooveSel <> 0 then set gN to "g" & gGrooveSel repeat with i = 1 to 8 if chars(the name of member the memberNum of sprite (10 + i), 2, length(the name of member the memberNum of sprite (10 + i))) = string(gGrooveSel) then set the memberNum of sprite (10 + i) to the number of member gN updateStage() exit repeat end if end repeat end if set gGrooveSel to integer(chars(the name of member the memberNum of sprite the clickOn, 2, length(the name of member the memberNum of sprite the clickOn))) set Hn to "H" & gGrooveSel set the memberNum of sprite the clickOn to the number of member Hn updateStage() repeat with i = 1 to 8 set audio to word i of line integer(chars(the name of member the memberNum of sprite the clickOn, 2, length(the name of member the memberNum of sprite the clickOn))) of field "grooveMem" if (audio <> "0") and getPos(audioList, chars(audio, 13, length(audio))) then IKVolumeSync(i, integer(chars(audio, 1, 3))) IKPanSync(i, integer(chars(audio, 7, 9))) IKPlay(i, getPos(audioList, chars(audio, 13, length(audio)))) setAt(stateTrackList, i, "on") setAt(virTracklIst, i, getPos(audioList, chars(audio, 13, length(audio)))) setAt(volValList, i, integer(chars(audio, 1, 3))) setAt(volPosList, i, integer(chars(audio, 4, 6))) setAt(panValList, i, integer(chars(audio, 7, 9))) setAt(panPosList, i, integer(chars(audio, 10, 12))) next repeat end if IKPlay(i, -1) setAt(stateTrackList, i, "off") setAt(virTracklIst, i, -1) setAt(volValList, i, 28) setAt(volPosList, i, 239) setAt(panValList, i, 64) setAt(panPosList, i, 239) end repeat put "GROOVE PLAYING" into field "fieldState" set the textFont of member "fieldState" to "IK10" set the foreColor of member "fieldState" to gBlue end case end if end if end