quantizationtools.milliseconds_to_q_events

abjad.tools.quantizationtools.milliseconds_to_q_events.milliseconds_to_q_events(milliseconds)[source]

Convert a list of millisecond durations to a list of QEvent objects.

Negative duration values can be used to indicate silence. Any resulting pitched QEvent objects will default to using middle-C.

abjad> from abjad.tools.quantizationtools import milliseconds_to_q_events
abjad> durations = [100, -250, 500]
abjad> milliseconds_to_q_events(durations)
[QEvent(Offset(0, 1), 0), QEvent(Offset(100, 1), None), QEvent(Offset(350, 1), 0), QEvent(Offset(850, 1), None)]

Return a list of QEvent objects.

This Page