def select_and_appoint_device(song, device_to_select, ignore_unmapped_macros=True):
 appointed_device = device_to_select
 if ignore_unmapped_macros:
  appointed_device = device_to_appoint(device_to_select)
 song.view.select_device(device_to_select, False)
 song.appointed_device = appointed_device

def select_and_appoint_device ( song , device_to_select , ignore_unmapped_macros = True ) : appointed_device = device_to_select if ignore_unmapped_macros : appointed_device = device_to_appoint ( device_to_select ) song . view . select_device ( device_to_select , False ) song . appointed_device = appointed_device
convenience function for selecting a device for a control surface to control .