indicators¶
Classes
Encoding and attaching harmonics. |
|
Indicator base class. |
-
class
pang.indicators.
Harmonics
¶ Encoding and attaching harmonics.
>>> instances = [0, 1, 2, 3] >>> durations = [1, 1, 0.5, 0.5] >>> pitches = [0, 0, (0, 12), 0] >>> sound_points_generator = pang.ManualSoundPointsGenerator( ... instances=instances, ... durations=durations, ... pitches=pitches, ... ) >>> sequence = pang.Sequence( ... sound_points_generator=sound_points_generator, ... ) >>> for event in sequence: ... harmonics = pang.Harmonics() ... pang.attach(harmonics, event) ... >>> sequence.simulate_queue() >>> server = sequence.servers[0] >>> q_event_sequence = server.q_event_sequence >>> quantizer = nauert.Quantizer() >>> optimizer = nauert.MeasurewiseAttackPointOptimizer() >>> result = quantizer(q_event_sequence, attack_point_optimizer=optimizer) >>> pang.decode(result) >>> abjad.show(result)
Attributes Summary
Call self as a function.
Special methods
-
overridden
__call__
(client)¶ Call self as a function.
Read-only properties
-
id
¶
-
overridden
-
class
pang.indicators.
Indicator
¶ Indicator base class. This is to support attaching indicators before quantizing using Nauert.
Enumerations
An enumeration. |
Functions
Attaching an indicator to an event. |
|
-
pang.indicators.
attach
(indicator, event)¶ Attaching an indicator to an event.
>>> instances = [0, 1, 2, 3] >>> durations = [1, 1, 0.5, 0.5] >>> sound_points_generator = pang.ManualSoundPointsGenerator( ... instances=instances, ... durations=durations, ... ) >>> sequence = pang.Sequence( ... sound_points_generator=sound_points_generator, ... ) >>> for event in sequence: ... harmonics = pang.Harmonics() ... pang.attach(harmonics, event) ... >>> print(sequence.pitches) [(0, 1000), (0, 1000), (0, 1000), (0, 1000)]
-
pang.indicators.
decode
(client)¶
-
pang.indicators.
decode_one_leaf
(leaf)¶