scamp_extensions.rhythm.boolean_streamer
Module containing the boolean_streamer()
decorator, which converts a boolean-yielding generator into a
BooleanStreamer
object. BooleanStreamer
objects are iterable and can be combined using the &,
| and ~ operators to compose more complex streams of booleans. A few useful decorated boolean_streamer functions
are given, including the SieveStreamer()
, which implements Xenakis-style sieves the RandStreamer()
, which
generates weighted random True/False values, and the FreqStreamer()
which generates regularly spaced True’s
at the frequency defined by the function.