if (field "fieldBpm" < (4 * gBpmSong / 5)) or (field "fieldBpm" > (6 * gBpmSong / 5)) then
put gBpmSong 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 200
set the locV of sprite 24 to 362
updateStage()
if word 2 of field "fieldDuration" = "sec" then
set sec to 1920 / float(field "fieldBpm") * the number of words in field "fieldMarkerSeq"
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"
end if
IKMixBPM(gBpmSong * 1000)
end if
end if
if the visible of window "synth" then
set pos to point(the mouseH + the stageLeft, the mouseV + the stageTop)
if inside(pos, the rect of window "synth") and the mouseDown then
set m to the mouseH + the stageLeft - getAt(the rect of window "synth", 1)
set N to the mouseV + the stageTop - getAt(the rect of window "synth", 2)
repeat while the mouseDown
set the rect of window "synth" to rect(the mouseH + the stageLeft - m, the mouseV + the stageTop - N, 318 + the mouseH + the stageLeft - m, 72 + the mouseV + the stageTop - N)
updateStage()
end repeat
set gPosSynth to the rect of window "synth"
end if
end if
if gLoadSeq <> VOID then
if (gLoadSeq <> EMPTY) and (FileExists(gLoadSeq) = 0) then
loadSeq()
end if
end if
if gYes then
set gYes to 0
if gOnSynth then
IKSynthStop()
set gOnSynth to 0
end if
if the visible of window "synth" then
close(window "synth")
end if
IKStop()
set markerSynthList to []
set gPlaySeq to 0
go("start", "menuSong")
end if
if gBpmPall then
if the mouseDown then
set x to the mouseH
if x > 273 then
set x to 273
end if
if x < 125 then
set x to 125
end if
set the locH of sprite 24 to x
set the locV of sprite 24 to 362
updateStage()
else
set gBpmPall to 0
end if
set bpm to (float((4 * the locH of sprite 24 / 15) - 52) * gBpmSong / float(100)) + gBpmSong - 1
IKMixBPM(bpm * 1000)
put bpm into field "fieldBpm"
set the textFont of member "fieldBpm" to "IK10"
set the foreColor of member "fieldBpm" to gGreen
if word 2 of field "fieldDuration" = "sec" then
set sec to 1920 / float(field "fieldBpm") * the number of words in field "fieldMarkerSeq"
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"
set the textFont of member "fieldDuration" to "IK10"
set the foreColor of member "fieldDuration" to gBlue
end if
end if
if gPlaySeq then
if IKGetCurrentBeat() = 20 then
set gOldCont to gCont
end if
if IKGetCurrentBeat() = 21 then
if gCont = gOldCont then
if gCont = count(markerList) then
set gCont to gStartSeq
else
set gCont to gCont + 1
end if
repeat with i = 1 to 8
set groove to word i of line getAt(markerList, gCont) of field "grooveMem"
if (groove <> "0") and getPos(audioList, chars(groove, 13, length(groove))) then