3 Replies Latest reply on Apr 27, 2006 8:46 AM by James Newton, ACP

    Background Music

      Hi there i am a student new to director and could do with a little help.
      I have a series of songs that i would like to be playing in a random order as background music throughout my director project and am wondering if any body can give me advice on the best way to do this.
      Any help would be greatly appreciated, many thanks

        • 1. Re: Background Music
          James Newton, ACP Level 3
          Create a list of songs in a random order...

          on GetListOfSoundMembers() --------------------------------------------
          -- OUTPUT: Returns a list of all sound members in the movie

          vSoundMemberList = []

          vLastLib = the number of castLibs
          repeat with vCastLib = 1 to vLastLib
          vLastMember = the number of members of castLib(vCastLib)
          repeat with vMemberNum = 1 to vLastMember
          vMember = member(vMemberNum, vCastLib)

          if vMember.type = #sound then
          end if
          end repeat
          end repeat

          return vSoundMemberList
          end GetListOfSoundMembers

          on GetRandomListOfSoundMembers() --------------------------------------
          -- OUTPUT: Returns a list of all sound members in the movie, in
          -- random order

          vRandomList = GetListOfSoundMembers()

          i = vRandomList.count
          repeat while i
          vRandom = random(i)
          vSound = vRandomList[vRandom]

          i = i - 1
          end repeat

          return vRandomList
          end GetRandomListOfSoundMembers

          ... then look at the sound queue() and sound play() commands.
          • 2. Re: Background Music
            daveowensleeds Level 1
            thanks very much for the help mate but could you please explain how to queue and play the sounds from the list as i am still struggling.

            thanks again
            • 3. Re: Background Music
              James Newton, ACP Level 3
              Visit the Director LiveDocs. In the left column, click on:

              * Director Scripting Reference
              ** Director Core Objects
              *** Sound Channel

              The entries for the various sound commands now appear in the column on the right.

              Controlling a single sound in a single channel