sieves¶
Functions
Generates pitches from a sieve (an |
-
pang.sieves.
gen_pitches_from_sieve
(sieve, origin=0, low=0, high=12, pitch_range=None, multiplier=1)¶ Generates pitches from a sieve (an
abjad.Pattern
object). .. container:: exampleA simple sieve:
>>> sieve = abjad.Pattern(indices=[0, 1, 7], period=12) >>> pitches = pang.gen_pitches_from_sieve(sieve=sieve, origin=6, low=-12, high=11) >>> print(pitches) [-11, -6, -5, 1, 6, 7]
>>> maker = abjad.NoteMaker() >>> notes = maker(pitches, [(1, 4)] * len(pitches)) >>> staff = abjad.Staff(notes) >>> abjad.attach(abjad.Clef("bass"), staff[0]) >>> abjad.show(staff)
Microtone sieves can also be created:
>>> sieve = abjad.Pattern(indices=[0, 3], period=10) >>> pitches = pang.gen_pitches_from_sieve( ... sieve=sieve, origin=0, low=0, high=11, multiplier=0.5 ... ) >>> print(pitches) [0.0, 1.5, 5.0, 6.5, 10.0]
>>> maker = abjad.NoteMaker() >>> notes = maker(pitches, [(1, 4)] * len(pitches)) >>> staff = abjad.Staff(notes) >>> abjad.show(staff)