home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- go(the frame)
- end
-
- on enterFrame
- global gOn, gOnSynth, gPath, gArp, gProg, gPosVolSynth, gPosPanSynth, gBlue, gLoadSynth, folderSynthList, progList, synthList
- if gOn and gOnSynth then
- if the visible of sprite 3 then
- set the visible of sprite 3 to 0
- end if
- else
- if not (the visible of sprite 3) then
- set the visible of sprite 3 to 1
- end if
- end if
- if the visible of window "openS" then
- if (field "fieldSynth" = EMPTY) and (folderSynthList <> []) then
- put getAt(folderSynthList, 1) into field "fieldSynth"
- set the textFont of field "fieldSynth" to "IK10"
- set the foreColor of member "fieldSynth" to gBlue
- updateStage()
- end if
- if (field "fieldSynth" <> EMPTY) and (folderSynthList = []) then
- put EMPTY into field "fieldSynth"
- set the textFont of field "fieldSynth" to "IK10"
- set the foreColor of member "fieldSynth" to gBlue
- updateStage()
- IKSynthStop()
- repeat with i = 1 to 3
- set start to (12 * (i - 1)) + 3
- repeat with j = 1 to 12
- if char 1 of the name of member the memberNum of sprite (start + j) = "y" then
- set nota to chars(the name of member the memberNum of sprite (start + j), 2, length(the name of member the memberNum of sprite (start + j))) & i
- if getPos(synthList, nota) then
- set nota to chars(nota, 1, length(nota) - 1)
- set the memberNum of sprite (start + j) to the number of member nota
- updateStage()
- end if
- end if
- end repeat
- end repeat
- set synthList to []
- set gOnSynth to 0
- end if
- if (field "fieldSynth" <> EMPTY) and (folderSynthList <> []) then
- if not getPos(folderSynthList, field "fieldSynth") then
- put getAt(folderSynthList, 1) into field "fieldSynth"
- set the textFont of field "fieldSynth" to "IK10"
- set the foreColor of member "fieldSynth" to gBlue
- updateStage()
- IKSynthStop()
- IKSetSynth(gPath & "Synth\" & field "fieldSynth" & "\")
- case char 1 of gArp of
- "[":
- set arp to 1
- "]":
- set arp to 2
- "{":
- set arp to 4
- "}":
- set arp to 8
- end case
- IKSynthVolume(integer(128 * (-gPosVolSynth + 54) / 45))
- IKSynthPan(integer(128 * (-gPosPanSynth + 54) / 45))
- IKSynthArp(getPos(progList, gProg) - 1, arp, createSeq())
- end if
- end if
- end if
- if gLoadSynth <> VOID then
- if (gLoadSynth <> EMPTY) and (FileExists(gLoadSynth) = 0) then
- loadSynth()
- end if
- end if
- end
-