soundpointsgenerators¶
Classes
Ataxic sound points generator. |
|
Gaussian (sampled) random walk sound points generator. |
|
Manual sound-point generator. |
|
Sound points generator, with pitches chosen with a random walk process. |
|
SoundPoint / Event. |
|
Abstract base sound-point generator. |
-
class
pang.soundpointsgenerators.AtaxicSoundPointsGenerator(arrival_rate=1, service_rate=1, pitch_set=[0], arrival_model='markov', service_model='markov', seed=123456, order='idp')¶ Ataxic sound points generator.
Initializing an ataxic cloud.
>>> pitch_set = list(range(24)) >>> sound_points_generator = pang.AtaxicSoundPointsGenerator( ... pitch_set=pitch_set, ... ) >>> sequence = pang.Sequence( ... sound_points_generator=sound_points_generator, ... sequence_duration=4, ... ) >>> 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) >>> abjad.show(result)
Special methods
-
(SoundPointsGenerator).__call__(sequence_duration)¶ Call self as a function.
-
(SoundPointsGenerator).__repr__()¶ Gets interpreter representation.
-
-
class
pang.soundpointsgenerators.GRWSoundPointsGenerator(arrival_rate=1, service_rate=1, arrival_model='markov', service_model='markov', pitch_set=[0], origin=None, mean=0, standard_deviation=1, seed=123456, order='idp')¶ Gaussian (sampled) random walk sound points generator.
>>> pitch_set = list(range(20)) >>> sound_points_generator = pang.GRWSoundPointsGenerator( ... pitch_set=pitch_set, ... ) >>> sequence = pang.Sequence( ... sound_points_generator=sound_points_generator, ... sequence_duration=4, ... ) >>> 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) >>> abjad.show(result)
Special methods
-
(SoundPointsGenerator).__call__(sequence_duration)¶ Call self as a function.
-
(SoundPointsGenerator).__repr__()¶ Gets interpreter representation.
-
-
class
pang.soundpointsgenerators.ManualSoundPointsGenerator(instances=[], durations=[], pitches=None)¶ Manual sound-point generator.
Initializing a sequence manually.
>>> 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, ... ) >>> print(sequence.instances) [0, 1, 2, 3]
>>> print(sequence.durations) [1, 1, 0.5, 0.5]
>>> print(sequence.sequence_duration) 3.5
>>> 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) >>> abjad.show(result)
Attributes Summary
Call self as a function.
Special methods
-
overridden
__call__(sequence_duration)¶ Call self as a function.
-
(SoundPointsGenerator).__repr__()¶ Gets interpreter representation.
-
overridden
-
class
pang.soundpointsgenerators.RandomWalkSoundPointsGenerator(arrival_rate=1, service_rate=1, arrival_model='markov', service_model='markov', pitch_set=[0], origin=None, seed=123456, order='idp')¶ Sound points generator, with pitches chosen with a random walk process.
Initializing an ataxic cloud.
>>> pitch_set = list(range(20)) >>> sound_points_generator = pang.RandomWalkSoundPointsGenerator( ... pitch_set=pitch_set, ... ) >>> sequence = pang.Sequence( ... sound_points_generator=sound_points_generator, ... sequence_duration=4, ... ) >>> 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) >>> abjad.show(result)
Special methods
-
(SoundPointsGenerator).__call__(sequence_duration)¶ Call self as a function.
-
(SoundPointsGenerator).__repr__()¶ Gets interpreter representation.
-
-
class
pang.soundpointsgenerators.SoundPoint(instance, duration, pitch)¶ SoundPoint / Event.
Attributes Summary
Read/write properties
-
duration¶
-
instance¶
-
pitch¶
-
-
class
pang.soundpointsgenerators.SoundPointsGenerator¶ Abstract base sound-point generator.
Attributes Summary
Call self as a function.
Gets interpreter representation.
Special methods
-
overridden
__call__(sequence_duration)¶ Call self as a function.
-
overridden
__repr__()¶ Gets interpreter representation.
-
overridden