select

topleveltools.select(argument=None)

Selects argument or makes empty selector.

Selects first two notes in staff:

>>> staff = Staff("c'4 d' e' f'")
>>> selection = select(staff[:2])
>>> for note in selection:
...     override(note).note_head.color = 'red'
... 
>>> show(staff) 

Initializes empty selector:

>>> select()
Selector()

Returns selection when argument is not none.

Returns selector when argument is none.