def make_touch_strip_mode_message(mode):
 mode_bytes = ()
 if (mode == TouchStripModes.CUSTOM_PITCHBEND):
  mode_bytes = int('1111001', 2)
 elif (mode == TouchStripModes.CUSTOM_VOLUME):
  mode_bytes = int('0000001', 2)
 elif (mode == TouchStripModes.CUSTOM_PAN):
  mode_bytes = int('0010001', 2)
 elif (mode == TouchStripModes.CUSTOM_DISCRETE):
  mode_bytes = int('0011001', 2)
 elif (mode == TouchStripModes.CUSTOM_FREE):
  mode_bytes = int('0001011', 2)
 elif (mode == TouchStripModes.MODWHEEL):
  mode_bytes = int('0000100', 2)
 elif (mode == TouchStripModes.PITCHBEND):
  mode_bytes = int('1111000', 2)
 else:
  raise RuntimeError(('Touch strip mode %i not supported' % mode))
 return make_message(23, (mode_bytes,))

def make_touch_strip_mode_message ( mode ) : mode_bytes = ( ) if ( mode == TouchStripModes . CUSTOM_PITCHBEND ) : mode_bytes = int ( '1111001' , 2 ) elif ( mode == TouchStripModes . CUSTOM_VOLUME ) : mode_bytes = int ( '0000001' , 2 ) elif ( mode == TouchStripModes . CUSTOM_PAN ) : mode_bytes = int ( '0010001' , 2 ) elif ( mode == TouchStripModes . CUSTOM_DISCRETE ) : mode_bytes = int ( '0011001' , 2 ) elif ( mode == TouchStripModes . CUSTOM_FREE ) : mode_bytes = int ( '0001011' , 2 ) elif ( mode == TouchStripModes . MODWHEEL ) : mode_bytes = int ( '0000100' , 2 ) elif ( mode == TouchStripModes . PITCHBEND ) : mode_bytes = int ( '1111000' , 2 ) else : raise RuntimeError ( ( 'Touch strip mode %i not supported' % mode ) ) return make_message ( 23 , ( mode_bytes , ) )
the behavior of the touch strip is defined by a number of flags put together into a 7 bit touch strip configuration setting .