set fullName to line the mouseLine of field "song"
repeat with i = 1 to 4
delete word 1 of fullName
if char 1 of fullName = " " then
delete char 1 of fullName
end if
end repeat
put fullName into field "fieldFullName"
41, 42, 43, 44, 45, 46, 47, 48:
if getAt(virTracklIst, the rollOver - 40) <> -1 then
set fullName to line getAt(virTracklIst, the rollOver - 40) of field "song"
repeat with i = 1 to 4
delete word 1 of fullName
if char 1 of fullName = " " then
delete char 1 of fullName
end if
end repeat
put fullName into field "fieldFullName"
else
if not gTraccia then
put " " into field "fieldFullName"
else
set fullName to line getAt(virTracklIst, gTraccia) of field "song"
repeat with i = 1 to 4
delete word 1 of fullName
if char 1 of fullName = " " then
delete char 1 of fullName
end if
end repeat
put fullName into field "fieldFullName"
end if
end if
otherwise:
if inside(point(the mouseH, the mouseV), rect(109, 63, 130, 84)) then
put getAt(randomizeList, 4) into field "fieldRandom"
else
if inside(point(the mouseH, the mouseV), rect(129, 47, 150, 68)) then
put getAt(randomizeList, 3) into field "fieldRandom"
else
if inside(point(the mouseH, the mouseV), rect(150, 32, 171, 54)) then
put getAt(randomizeList, 2) into field "fieldRandom"
else
if inside(point(the mouseH, the mouseV), rect(171, 20, 193, 41)) then
put getAt(randomizeList, 1) into field "fieldRandom"
else
put gRandom into field "fieldRandom"
end if
end if
end if
end if
set the textFont of member "fieldRandom" to "IK10"
set the foreColor of member "fieldRandom" to gRed
set N to 0
if inside(point(the mouseH, the mouseV), rect(295, 42, 344, 92)) and (getAt(virTracklIst, 1) <> -1) then
set N to getAt(virTracklIst, 1)
else
if inside(point(the mouseH, the mouseV), rect(295, 387, 344, 437)) and (getAt(virTracklIst, 5) <> -1) then
set N to getAt(virTracklIst, 5)
else
if inside(point(the mouseH, the mouseV), rect(416, 91, 466, 141)) and (getAt(virTracklIst, 2) <> -1) then
set N to getAt(virTracklIst, 2)
else
if inside(point(the mouseH, the mouseV), rect(416, 336, 466, 386)) and (getAt(virTracklIst, 4) <> -1) then
set N to getAt(virTracklIst, 4)
else
if inside(point(the mouseH, the mouseV), rect(174, 91, 224, 141)) and (getAt(virTracklIst, 8) <> -1) then
set N to getAt(virTracklIst, 8)
else
if inside(point(the mouseH, the mouseV), rect(174, 336, 224, 386)) and (getAt(virTracklIst, 6) <> -1) then
set N to getAt(virTracklIst, 6)
else
if inside(point(the mouseH, the mouseV), rect(467, 216, 517, 266)) and (getAt(virTracklIst, 3) <> -1) then
set N to getAt(virTracklIst, 3)
else
if inside(point(the mouseH, the mouseV), rect(123, 216, 173, 266)) and (getAt(virTracklIst, 7) <> -1) then
set N to getAt(virTracklIst, 7)
end if
end if
end if
end if
end if
end if
end if
end if
if N then
set fullName to line N of field "song"
repeat with i = 1 to 4
delete word 1 of fullName
if char 1 of fullName = " " then
delete char 1 of fullName
end if
end repeat
put fullName into field "fieldFullName"
else
if not gTraccia then
put " " into field "fieldFullName"
else
if getAt(virTracklIst, gTraccia) = -1 then
put " " into field "fieldFullName"
else
set fullName to line getAt(virTracklIst, gTraccia) of field "song"
repeat with i = 1 to 4
delete word 1 of fullName
if char 1 of fullName = " " then
delete char 1 of fullName
end if
end repeat
put fullName into field "fieldFullName"
end if
end if
end if
end case
if not (the editable of member "fieldBpm") then
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 321
set the locV of sprite 24 to 449
updateStage()
IKMixBPM(gBpmSong * 1000)
end if
end if
if the visible of window "Help" then
moveHelp()
showGrooveMessage()
if rollOver(53) then
tell window "help"
go("grooveM10")
end tell
end if
end if
if gClose then
set gClose to 0
scrollByLine(member "fieldAudio", 1)
scrollByLine(member "fieldAudio", -1)
end if
if gOnSynth then
set the visible of sprite 52 to 1
set the visible of sprite 51 to 0
else
if windowPresent("synth") then
set the visible of sprite 51 to 1
set the visible of sprite 52 to 0
end if
end if
if getAt(tapList, 2) then
if (the timer - getAt(tapList, 2)) > 80 then
puppetSprite(26, 0)
end if
else
if getAt(tapList, 1) then
if (the timer - getAt(tapList, 1)) > 80 then
puppetSprite(26, 0)
end if
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 gloadGroove <> VOID then
if (gloadGroove <> EMPTY) and (FileExists(gloadGroove) = 0) then
loadGroove()
end if
end if
if gYesDel then
set gYesDel to 0
IKBeginBlock()
repeat with i = 1 to 8
if getAt(virTracklIst, i) <> -1 then
IKPlay(i, -1)
put "=" into word 1 of line getAt(virTracklIst, i) of field "fieldAudio"
puppetSprite(12, 0)
put EMPTY into field "fieldRandom"
end if
end repeat
IKEndBlock()
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 [64, 64, 64, 64, 64, 64, 64, 64]
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]
set keepList to [0, 0, 0, 0, 0, 0, 0, 0]
set soloGroupList to [0, 0, 0, 0, 0, 0, 0, 0]
put " " into field "fieldFullName"
set gTraccia to 0
set the foreColor of field "fieldAudio" to gGreen
if gSolo then
set gSolo to 0
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
set markerSynthList to []
set keepList to [0, 0, 0, 0, 0, 0, 0, 0]
IKStop()
go("start", "menuSong")
end if
if gSolo then
set the memberNum of sprite 11 to the number of member "Hsolo"
else
set the memberNum of sprite 11 to the number of member "solo"
end if
updateStage()
if stateTrackList = ["off", "off", "off", "off", "off", "off", "off", "off"] then
repeat with i = 1 to 8
set controlT to "controlT" & i
set the memberNum of sprite (40 + i) to the number of member controlT
updateStage()
end repeat
set the memberNum of sprite 39 to 1000
updateStage()
put EMPTY into field "fieldBarBeat"
end if
if gOn and (virTracklIst <> [-1, -1, -1, -1, -1, -1, -1, -1]) then
set valore to IKGetCurrentBeat()
if valore <> -1 then
set beat to (valore mod 4) + 1
set temp to (valore / 4) + 1
if gSync then
if (the timer mod 80) < 40 then
set the memberNum of sprite 54 to the number of member "HRledSync"
else
set the memberNum of sprite 54 to the number of member "ledSync"
end if
updateStage()
if temp = 1 then
set the memberNum of sprite 54 to the number of member "ledSync"
updateStage()
set gSync to 0
end if
else
set gFirstClick to 1
end if
if beat <> word 2 of field "fieldBarBeat" then
put beat into word 2 of field "fieldBarBeat"
end if
if temp <> word 1 of field "fieldBarBeat" then
put temp & " " & beat into field "fieldBarBeat"
end if
set bar to "bar" & word 1 of field "fieldBarBeat"
set the memberNum of sprite 39 to the number of member bar
set the loc of sprite 39 to point(320, 240)
updateStage()
end if
set the textFont of member "fieldBarBeat" to "IK10"
set the foreColor of member "fieldBarBeat" to gGreen
else
set the memberNum of sprite 39 to 1000
updateStage()
end if
repeat with i = 1 to 8
if getAt(virTracklIst, i) <> -1 then
set barra to "barraVol" & i & getAt(volValList, i) / 8
set the memberNum of sprite (13 + i) to the number of member barra
case i of
1:
set the loc of sprite 14 to point(320, 131)
2:
set the loc of sprite 15 to point(396, 163)
3:
set the loc of sprite 16 to point(429, 240)
4:
set the loc of sprite 17 to point(396, 316)
5:
set the loc of sprite 18 to point(320, 349)
6:
set the loc of sprite 19 to point(243, 316)
7:
set the loc of sprite 20 to point(211, 240)
8:
set the loc of sprite 21 to point(243, 163)
end case
else
set the memberNum of sprite (13 + i) to 2000
end if
updateStage()
end repeat
if gBpmPall then
if the mouseDown then
set x to the mouseH
if x > 396 then
set x to 395
end if
if x < 246 then
set x to 246
end if
set the locH of sprite 24 to x
set the locV of sprite 24 to 449
updateStage()
else
set gBpmPall to 0
end if
set bpm to (float(4 * (the locH of sprite 24 - 321) / 15) * gBpmSong / float(100)) + gBpmSong
IKMixBPM(bpm * 1000)
put bpm into field "fieldBpm"
set the textFont of member "fieldBpm" to "IK10"
set the foreColor of member "fieldBpm" to gGreen
end if
if gOnVol then
if the mouseDown then
set y to the mouseV
if y < 168 then
set y to 168
end if
if y > 310 then
set y to 310
end if
set the loc of sprite 3 to point(529, y)
updateStage()
setAt(volPosList, gTraccia, the locV of sprite 3)
set vol to 128 / power(1.02150000000000007, 142) * power(1.02150000000000007, ((-141 * the locV of sprite 3) + 142 + (310 * 141)) / 142)
if integer(vol) = 6 then
set vol to 0
end if
if integer(vol) = 123 then
set vol to 128
end if
setAt(volValList, gTraccia, integer(vol))
IKVolume(gTraccia, vol)
else
set gOnVol to 0
end if
end if
if gOnPan then
if the mouseDown then
set y to the mouseV
if y < 163 then
set y to 163
end if
if y > 315 then
set y to 315
end if
set the loc of sprite 4 to point(543, y)
updateStage()
setAt(panPosList, gTraccia, y)
set pan to (getAt(panPosList, gTraccia) - 163) * 16 / 19