make_tied_leaf

scoretools.make_tied_leaf(kind, duration, decrease_durations_monotonically=True, forbidden_written_duration=None, pitches=None, tie_parts=True, use_messiaen_style_ties=False)

Makes tied kind with duration.

Example 1. Make note:

>>> leaves = scoretools.make_tied_leaf(
...     Note,
...     Duration(1, 2),
...     pitches='C#5',
...     )
>>> staff = Staff(leaves)
>>> time_signature = TimeSignature((2, 4))
>>> attach(time_signature, staff)
>>> show(staff) 

Example 2. Make note and forbid half notes:

>>> leaves = scoretools.make_tied_leaf(
...     Note,
...     Duration(1, 2),
...     pitches='C#5',
...     forbidden_written_duration=Duration(1, 2),
...     )
>>> staff = Staff(leaves)
>>> time_signature = TimeSignature((2, 4))
>>> attach(time_signature, staff)
>>> show(staff) 

Example 3. Make tied note with half notes forbidden and durations decreasing monotonically:

>>> leaves = scoretools.make_tied_leaf(
...     Note,
...     Duration(9, 8),
...     pitches='C#5',
...     forbidden_written_duration=Duration(1, 2),
...     decrease_durations_monotonically=True,
...     )
>>> staff = Staff(leaves)
>>> time_signature = TimeSignature((9, 8))
>>> attach(time_signature, staff)
>>> show(staff) 

Example 4. Make tied note with half notes forbidden and durations increasing monotonically:

>>> leaves = scoretools.make_tied_leaf(
...     Note,
...     Duration(9, 8),
...     pitches='C#5',
...     forbidden_written_duration=Duration(1, 2),
...     decrease_durations_monotonically=False,
...     )
>>> staff = Staff(leaves)
>>> time_signature = TimeSignature((9, 8))
>>> attach(time_signature, staff)
>>> show(staff) 

Example 5. Uses Messiaen-style ties:

>>> leaves = scoretools.make_tied_leaf(
...     Note,
...     Duration(9, 8),
...     pitches='C#5',
...     decrease_durations_monotonically=False,
...     forbidden_written_duration=Duration(1, 2),
...     use_messiaen_style_ties=True,
...     )
>>> staff = Staff(leaves)
>>> time_signature = TimeSignature((9, 8))
>>> attach(time_signature, staff)
>>> show(staff) 

Returns selection of leaves.