home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- if not (the visible of window "help") then
- if inside(the clickLoc, rect(567, 413, 634, 426)) then
- repeat while the mouseDown
- set the memberNum of sprite 13 to the number of member "Hseq"
- set the ink of sprite 13 to 36
- set the loc of sprite 13 to point(601, 422)
- updateStage()
- end repeat
- pass()
- end if
- if inside(the clickLoc, rect(567, 372, 634, 387)) then
- repeat while the mouseDown
- set the memberNum of sprite 13 to the number of member "HsongMenu"
- set the ink of sprite 13 to 36
- set the loc of sprite 13 to point(601, 381)
- updateStage()
- end repeat
- pass()
- end if
- if inside(the clickLoc, rect(567, 393, 634, 408)) then
- repeat while the mouseDown
- set the memberNum of sprite 13 to the number of member "Hgroove"
- set the ink of sprite 13 to 36
- set the loc of sprite 13 to point(601, 401)
- updateStage()
- end repeat
- pass()
- end if
- if inside(the clickLoc, rect(592, 453, 611, 471)) then
- repeat while the mouseDown
- set the memberNum of sprite 10 to the number of member "Hpref"
- set the ink of sprite 10 to 36
- set the loc of sprite 10 to point(602, 464)
- updateStage()
- end repeat
- pass()
- end if
- if inside(the clickLoc, rect(615, 453, 634, 471)) then
- repeat while the mouseDown
- set the memberNum of sprite 10 to the number of member "Hquit"
- set the ink of sprite 10 to 36
- set the loc of sprite 10 to point(625, 464)
- updateStage()
- end repeat
- end if
- end if
- end
-
- on mouseUp
- global gBpmSong, gSelDuration, gPlaySong, gReturn, gPath, gStyle, gOnSynth, gGrooveSel, gFade, gRandom, gMix, gGreen, markerList, stateTrackList, tapList, randomizeList
- if not (the visible of window "help") then
- if inside(point(the mouseH, the mouseV), rect(567, 413, 634, 426)) then
- repeat with i = 2 to 10
- puppetSprite(i, 0)
- end repeat
- repeat with i = 43 to 44
- puppetSprite(i, 0)
- end repeat
- puppetSprite(48, 0)
- set tapList to [0, 0]
- if IKGetCurrentBeat() <> -1 then
- if gOnSynth then
- IKSynthStop()
- set gOnSynth to 0
- end if
- IKStop()
- IKFunction()
- set gPlaySong to 0
- set the memberNum of sprite 39 to 1000
- end if
- put EMPTY into field "fieldBarBeat"
- go("seq")
- set bpm to float(field "fieldBpm")
- set the locH of sprite 24 to (15 * ((100 * (bpm - gBpmSong) / gBpmSong) + 52) / 4) + 5
- set the locV of sprite 24 to 362
- updateStage()
- set gGrooveSel to 0
- put EMPTY into field "fieldState"
- if markerList = [] then
- put EMPTY into field "fieldDuration"
- else
- put 8 * count(markerList) & " bars" into field "fieldDuration"
- end if
- set the visible of sprite 55 to 1
- pass()
- end if
- if inside(point(the mouseH, the mouseV), rect(567, 372, 634, 387)) then
- openWin("YesNo")
- tell window "YesNo"
- go("newSong")
- end tell
- pass()
- end if
- if inside(point(the mouseH, the mouseV), rect(567, 393, 634, 408)) then
- repeat with i = 2 to 10
- puppetSprite(i, 0)
- end repeat
- repeat with i = 43 to 44
- puppetSprite(i, 0)
- end repeat
- puppetSprite(48, 0)
- set gPlaySong to 0
- if gFade then
- IKMasterVolume(integer(field "fieldMasterVol"))
- end if
- set the memberNum of sprite 39 to 1000
- set the loc of sprite 39 to point(320, 240)
- go("groove")
- put integer(word 1 of field "fieldBarBeat") into word 1 of field "fieldBarBeat"
- set bpm to float(field "fieldBpm")
- set the locH of sprite 24 to (15 * 25 * (bpm - gBpmSong) / gBpmSong) + 321
- set the locV of sprite 24 to 449
- updateStage()
- case random(4) of
- 4:
- set gRandom to getAt(randomizeList, 4)
- 3:
- set gRandom to getAt(randomizeList, 3)
- 2:
- set gRandom to getAt(randomizeList, 2)
- 1:
- set gRandom to getAt(randomizeList, 1)
- end case
- updateStage()
- playRandom()
- repeat with i = 50 to 56
- set the visible of sprite i to 1
- end repeat
- pass()
- end if
- if inside(point(the mouseH, the mouseV), rect(615, 453, 634, 471)) then
- openWin("YesNo")
- tell window "YesNo"
- go("quit")
- end tell
- pass()
- end if
- if inside(point(the mouseH, the mouseV), rect(592, 453, 611, 471)) then
- if the visible of window "synth" then
- close(window "synth")
- end if
- if IKGetCurrentBeat() <> -1 then
- set gPlaySong to 0
- set sNum to "s" & gStyle
- set the memberNum of sprite (1 + gStyle) to the number of member sNum
- updateStage()
- set gStyle to 0
- if gOnSynth then
- IKSynthStop()
- set gOnSynth to 0
- end if
- IKStop()
- IKFunction()
- end if
- set gReturn to "vMix grooveM"
- go("start", "pref")
- pass()
- end if
- if inside(point(the mouseH, the mouseV), rect(489, 408, 523, 442)) then
- set click to the timer
- if getAt(tapList, 2) <> 0 then
- if ((click - getAt(tapList, 2)) <= 80) and ((click - getAt(tapList, 2)) >= 10) then
- puppetSprite(10, 0)
- set media to float((click - getAt(tapList, 1)) / 2)
- set bpm to float(3600) / media
- if bpm > (6 * gBpmSong / 5) then
- set bpm to float(6 * gBpmSong / 5)
- end if
- if bpm < (4 * gBpmSong / 5) then
- set bpm to float(4 * gBpmSong / 5)
- end if
- set tapList to [0, 0]
- IKMixBPM(bpm * 1000)
- put bpm into field "fieldBpm"
- set the textFont of member "fieldBpm" to "IK10"
- set the foreColor of member "fieldBpm" to gGreen
- set the locH of sprite 24 to (15 * 25 * (bpm - gBpmSong) / gBpmSong) + 321
- set the locV of sprite 24 to 341
- updateStage()
- else
- set tapList to [click, 0]
- puppetSprite(10, 1)
- set the memberNum of sprite 10 to the number of member "Htap"
- set the loc of sprite 10 to point(507, 425)
- set the ink of sprite 10 to 8
- updateStage()
- end if
- else
- if (getAt(tapList, 2) = 0) and (getAt(tapList, 1) <> 0) then
- if ((click - getAt(tapList, 1)) <= 80) and ((click - getAt(tapList, 1)) >= 10) then
- setAt(tapList, 2, click)
- else
- setAt(tapList, 1, click)
- end if
- else
- setAt(tapList, 1, click)
- end if
- puppetSprite(10, 1)
- set the memberNum of sprite 10 to the number of member "Htap"
- set the loc of sprite 10 to point(507, 425)
- set the ink of sprite 10 to 8
- updateStage()
- end if
- end if
- end if
- set the editable of member "fieldBpm" to 0
- end
-