| ---------BX24 
          code for <Virtual Flesh> with director connection ------ 
    dim outputBuffer(1 
          To 45) as bytedim inputBuffer(1 To 13) as byte
 dim midiCmd as byte
 dim velocity as byte
  Sub main() do call delay(0.5) 
          ' start program with a half-second delay dim noteVar 
          as bytedim Qprox1 as integer
 dim Qprox2 as integer
 dim Qprox3 as integer
 dim Qprox4 as integer
 dim Qprox5 as integer
 dim Qprox6 as integer
 dim Qprox7 as integer
 dim Qprox8 as integer
  call openQueue(outputBuffer, 
          45)call openQueue(inputBuffer, 13)
 call defineCom3(11,12,bx1000_1000)
 call openCom(3, 9600, inputBuffer, outputBuffer)
 Qprox1 
          = getADC(13)Qprox2 = getADC(14)
 Qprox3 = getADC(15)
 Qprox4 = getADC(16)
 Qprox5 = getADC(17)
 Qprox6 = getADC(18)
 Qprox7 = getADC(19)
 Qprox8 = getADC(20)
 ' get a note range from 36 to 96
 ' sent a noteon message, channel 1, velocity 64:
 if ( Qprox1 
          > 400 ) then ' touch on Qprox1noteVar = 45
 midiCmd = 144
 velocity = 64
  elseif 
          ( Qprox2 > 400 ) then ' touch on Qprox2noteVar = 50
 midiCmd = 144
 velocity = 64
  elseif 
          ( Qprox3 > 400 ) then ' touch on Qprox3noteVar = 55
 midiCmd = 144
 velocity = 64
  elseif 
          ( Qprox4 > 400 ) then ' touch on Qprox4noteVar = 60
 midiCmd = 144
 velocity = 64
  elseif 
          ( Qprox5 > 400 ) then ' touch on Qprox5noteVar = 65
 midiCmd = 144
 velocity = 64
  elseif 
          ( Qprox6 > 400 ) then ' touch on Qprox6noteVar = 70
 midiCmd = 144
 velocity = 64
  elseif 
          ( Qprox7 > 400 ) then ' touch on Qprox7noteVar = 75
 midiCmd = 144
 velocity = 64
  elseif 
          ( Qprox8 > 400 ) then ' touch on Qprox8noteVar = 80
 midiCmd = 144
 velocity = 64
  else' sent a noteoff message, channel 1, velocity 64:
 noteVar = 30 '----?
 midiCmd = 144
 velocity = 0
 end if debug.print 
          "noteVar = " ; cstr(noteVar)  call putQueue(OutputBuffer, 
          midiCmd, 1)call putQueue(OutputBuffer, noteVar, 1)
 call putQueue(OutputBuffer, velocity, 1)
 call delay(0.5)
  loop end sub ------- 
          PHOTOSHOP 
            LAYER ORDERFRAG 
            8 - 7- 6 - 5 - 4 - 3 - 1 - 2 - BACKGROUND 
            LAYER  |