home *** CD-ROM | disk | FTP | other *** search
- on prepare
- global gSong, gPath, gBpmSong, gGrooveSel, scaleList, audioList, keyNoteList, keyList, gInfo
- stop(member "preview")
- IKRealtimeFreq(22050)
- set gBpmSong to integer(field "fieldBpm")
- set scaleList to []
- set linea to chars(line the number of lines in gInfo - 3 of gInfo, 3, length(line the number of lines in gInfo - 3 of gInfo))
- repeat with i = 1 to the number of words in linea
- append(scaleList, word i of linea)
- end repeat
- sort(scaleList)
- if getPos(scaleList, "A") then
- deleteAt(scaleList, getPos(scaleList, "A"))
- append(scaleList, "A")
- end if
- if getPos(scaleList, "Ad") then
- deleteAt(scaleList, getPos(scaleList, "Ad"))
- append(scaleList, "Ad")
- end if
- if getPos(scaleList, "B") then
- deleteAt(scaleList, getPos(scaleList, "B"))
- append(scaleList, "B")
- end if
- put EMPTY into field "song"
- repeat with i = 1 to the number of lines in gInfo - 12
- put line i of gInfo into line i of field "song"
- end repeat
- put EMPTY into field "compSong"
- repeat with i = 1 to 8
- put line the number of lines in gInfo - 12 + i of gInfo into line i of field "compSong"
- end repeat
- IKResetVTracks()
- repeat with i = 1 to the lineCount of member "song"
- set nomeFile to word 1 of line i of field "song"
- set rep to integer(word 6 of line i of field "song")
- IKAddVTrack(gPath & "song:song22:" & gSong & ":" & nomeFile, rep, 0)
- end repeat
- IKSetSongBPM(gBpmSong)
- IKBegin("IKTRACK.X32 CTL3DV2.DLL")
- IKMasterVolume(integer(field "fieldMasterVol"))
- IKMixBPM(gBpmSong)
- if field "fieldSynth" <> EMPTY then
- IKSetSynth(gPath & "synth:synth22:" & field "fieldSynth" & ":")
- end if
- put EMPTY into field "fieldAudio"
- set audioList to []
- repeat with i = 1 to the lineCount of member "song"
- put "àà " & word 1 of line i of field "song" & RETURN after field "fieldAudio"
- append(audioList, word 1 of line i of field "song")
- end repeat
- delete char -30000 of field "fieldAudio"
- scrollByPage(member "fieldAudio", -((the lineCount of member "fieldAudio" / 20) + 1))
- set the textFont of member "fieldAudio" to "GMfont"
- set the foreColor of member "fieldAudio" to 54
- set gGrooveSel to 0
- set keyNoteList to [:]
- set k to 0
- repeat with i = 1 to 3
- repeat with j = 1 to count(scaleList)
- set k to k + 1
- addProp(keyNoteList, getAt(keyList, k), getAt(scaleList, j))
- end repeat
- end repeat
- end
-