repeat
   configure ADBIO unit 1 port B as {digital in, digital in, digital in, digital in}
   set numDrives to 3
   get ADBIO unit 1 port B channel 1
   if the value of (get ADBIO unit 1 port B channel 1) contains {value:low} then
      get cd information of drive 1
      if (get cd information of drive 1) contains {play state:5} then play audio cd in drive 1 starting with track 1
      if (get cd information of drive 1) contains {play state:0} then continue audio cd in drive 1
   else if the value of (get ADBIO unit 1 port B channel 1) contains {value:high} then
      stop audio cd in drive 1
   end if
   get ADBIO unit 1 port B channel 2
   if the value of (get ADBIO unit 1 port B channel 2) contains {value:low} then
      get cd information of drive 2
      if (get cd information of drive 2) contains {play state:5} then play audio cd in drive 2 starting with track 1
      if (get cd information of drive 2) contains {play state:0} then continue audio cd in drive 2
   else if the value of (get ADBIO unit 1 port B channel 2) contains {value:high} then
      stop audio cd in drive 2
   end if
   get ADBIO unit 1 port B channel 3
   if the value of (get ADBIO unit 1 port B channel 3) contains {value:low} then
      get cd information of drive 3
      if (get cd information of drive 3) contains {play state:5} then play audio cd in drive 3 starting with track 1
      if (get cd information of drive 3) contains {play state:0} then continue audio cd in drive 3
   else if the value of (get ADBIO unit 1 port B channel 3) contains {value:high} then
      stop audio cd in drive 3
   end if
end repeat

Back | Audio Home | Home