(An alternate method would be to be able to set the value via a max for live toggle, but I figure this is more complicated because Live wants to do other things (for instance, select a drum pad) based on the presence of a drum rack that the first method would comply with but this alternate method would not...)
I assume it's all in here, and I've tried redefining drum_device with stuff like "= self.song().view.selected_track.view.selected_device.can_have_drum_pads" but I've obviously got something wrong.def _select_note_mode(self):
"""
Selects which note mode to use depending on the kind of
current selected track and its device chain...
"""
track = self.song().view.selected_track
drum_device = find_if(lambda d: d.can_have_drum_pads, track.devices)
self._step_sequencer.set_drum_group_device(drum_device)
if track == None or track.is_foldable or track in self.song().return_tracks or track == self.song().master_track:
self._note_modes.selected_mode = 'disabled'
elif track and track.has_audio_input:
self._note_modes.selected_mode = 'looper'
elif drum_device:
self._note_modes.selected_mode = 'sequencer'
else:
self._note_modes.selected_mode = 'instrument'
Cheers!