home *** CD-ROM | disk | FTP | other *** search
/ Computer Music Interactif 7 / cd.iso / pc / PC / Demos / GroovMak / data1.cab / Program_Executable_Files / Media / grooveM.dxr / 00341.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  2.7 KB  |  91 lines

  1. on createGlobalVariable
  2.   global gTraccia, gSolo, gOn, gloadGroove, gBpmPall, gToSeq, gLoadSynth, gSync, gFirstClick, gBlue, gfirstmarker, glastmarker, markerList
  3.   set gBlue to 151
  4.   set gSync to 0
  5.   set gFirstClick to 1
  6.   if markerList = [] then
  7.     set gfirstmarker to 0
  8.     set glastmarker to 0
  9.   end if
  10.   set gLoadSynth to EMPTY
  11.   set gloadGroove to EMPTY
  12.   set gOn to 1
  13.   set gTraccia to 0
  14.   set gBpmPall to 0
  15.   set gYesDelUser to 0
  16.   set gToSeq to 0
  17. end
  18.  
  19. on createList
  20.   global redList, soloList, tapList, tempList, catlist, markerList, groupList, minMaxGroupList
  21.   if not markerList then
  22.     set markerList to []
  23.   end if
  24.   set tempList to [EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY]
  25.   set redList to [0, 0, 0, 0, 0, 0, 0, 0]
  26.   set soloList to [0, 0, 0, 0, 0, 0, 0, 0]
  27.   set tapList to [0, 0]
  28.   set catlist to [:]
  29.   repeat with i = 1 to count(groupList)
  30.     addProp(catlist, getAt(groupList, i), integer(word 2 of getAt(minMaxGroupList, i)) - integer(word 1 of getAt(minMaxGroupList, i)) + 1)
  31.   end repeat
  32. end
  33.  
  34. on writeField
  35.   global gSong, gRed, gBlue, gGreen
  36.   put " " into field "fieldFullName"
  37.   set the textFont of member "fieldFullName" to "IK10"
  38.   set the foreColor of member "fieldFullName" to gRed
  39.   put gSong into field "fieldNameSong"
  40.   set the textFont of member "fieldNameSong" to "IK10"
  41.   set the foreColor of member "fieldNameSong" to gBlue
  42.   set the textFont of member "fieldBarBeat" to "IK10"
  43.   set the foreColor of member "fieldBarBeat" to gGreen
  44. end
  45.  
  46. on handlesprite
  47.   global soloGroupList, stateTrackList
  48.   repeat with i = 3 to 4
  49.     puppetSprite(i, 0)
  50.   end repeat
  51.   set the loc of sprite 11 to point(205, 55)
  52.   updateStage()
  53.   puppetSprite(12, 1)
  54.   puppetSprite(13, 1)
  55.   repeat with i = 14 to 21
  56.     puppetSprite(i, 1)
  57.     set the ink of sprite i to 36
  58.   end repeat
  59.   repeat with i = 30 to 37
  60.     puppetSprite(i, 1)
  61.   end repeat
  62.   puppetSprite(39, 1)
  63.   set the loc of sprite 3 to point(529, 239)
  64.   set the loc of sprite 4 to point(543, 239)
  65.   set the visible of sprite 23 to 0
  66.   puppetSprite(24, 1)
  67.   repeat with i = 1 to 8
  68.     if getAt(stateTrackList, i) <> "off" then
  69.       puppetSprite(40 + i, 1)
  70.       if getAt(soloGroupList, i) then
  71.         set controlT to getAt(stateTrackList, i) & i & "S"
  72.       else
  73.         set controlT to getAt(stateTrackList, i) & i
  74.       end if
  75.       set the memberNum of sprite (40 + i) to the number of member controlT
  76.       updateStage()
  77.     end if
  78.   end repeat
  79.   repeat with i = 51 to 53
  80.     set the visible of sprite i to 0
  81.   end repeat
  82. end
  83.  
  84. on writeFieldGroove
  85.   if IKGetCurrentBeat() <> -1 then
  86.     set beat to (IKGetCurrentBeat() mod 4) + 1
  87.     set bar to (IKGetCurrentBeat() / 4) + 1
  88.     put bar & "      " & beat into field "fieldBarBeat"
  89.   end if
  90. end
  91.