aleatora.streams package¶
Submodules¶
aleatora.streams.audio module¶
- aleatora.streams.audio.AudioStream_freeze(self, key=None, redo=False, verbose=False)¶
- aleatora.streams.audio.AudioStream_getitem(self, index)¶
- aleatora.streams.audio.AudioStream_hold(self, duration)¶
- aleatora.streams.audio.AudioStream_record(self, key=None, redo=False)¶
- class aleatora.streams.audio.Mixer(streams=[], fill=0)¶
Bases:
objectSupports dynamically connecting and disconnecting streams to output. This allows for a more imperative, ChucK-ish style.
Example:
@stream def example(): out = Mixer() out <= osc(100) # connect oscillator to output yield from out[:0.5] # yield samples for 0.5 seconds handle = out <= osc(200) # connect another oscillator, save handle yield from out[:0.5] # yield for another 0.5 seconds out >= handle # disconnect the last oscillator yield from out # yield all the remaining output
- aleatora.streams.audio.aa_saw(freq)¶
- aleatora.streams.audio.aa_sqr(freq)¶
- aleatora.streams.audio.aa_tri(freq)¶
- aleatora.streams.audio.adsr(attack, decay, sustain_time, sustain_level, release)¶
- aleatora.streams.audio.basic_sequencer(note_stream, bpm=80)¶
- aleatora.streams.audio.branch(choices, default=<aleatora.streams.core.FunctionStream object>)¶
- aleatora.streams.audio.bytebeat(fn, sample_rate=None)¶
- aleatora.streams.audio.cons(item, stream)¶
- aleatora.streams.audio.convert_time(time)¶
- aleatora.streams.audio.db(decibels)¶
- aleatora.streams.audio.fit(stream, length)¶
- aleatora.streams.audio.flip(a, b)¶
- aleatora.streams.audio.floatbeat(fn)¶
- class aleatora.streams.audio.frame(*args)¶
Bases:
tuple
- aleatora.streams.audio.freeze(strm, verbose=False)¶
- aleatora.streams.audio.freeze(key: str, strm, redo=False, verbose=False)
Freeze a stream and optionally save the result to a file. Assumes stream is finite.
If the file already exists, load it instead of running the stream, unless redo=True.
- aleatora.streams.audio.hot(f)¶
- aleatora.streams.audio.kilobeat(fn)¶
- aleatora.streams.audio.m2f(midi)¶
- aleatora.streams.audio.make_frame_op(op, reversed=False)¶
- aleatora.streams.audio.maybe_const(thing)¶
- aleatora.streams.audio.normalize(strm)¶
- aleatora.streams.audio.pan(stream, pos)¶
- aleatora.streams.audio.peek(strm, default=None)¶
- aleatora.streams.audio.record(stream, verbose=False)¶
- aleatora.streams.audio.record(key: str, stream, redo=False, verbose=False)
- aleatora.streams.audio.resample_list(list, rate, index=0)¶
aleatora.streams.core module¶
- class aleatora.streams.core.ConcatStream(streams)¶
Bases:
aleatora.streams.core.Stream
- class aleatora.streams.core.FunctionStream(func)¶
Bases:
aleatora.streams.core.Stream
- class aleatora.streams.core.MixStream(streams)¶
Bases:
aleatora.streams.core.Stream
- class aleatora.streams.core.SliceStream(stream, start, stop, step)¶
Bases:
aleatora.streams.core.Stream
- class aleatora.streams.core.Stream(iterable)¶
Bases:
collections.abc.Iterable- bind(**kwargs)¶
- chunk(**kwargs)¶
- cycle(**kwargs)¶
- each(**kwargs)¶
- filter(**kwargs)¶
- flatten(**kwargs)¶
- fold(**kwargs)¶
- freeze(key=None, redo=False, verbose=False)¶
- hold(duration)¶
- join(**kwargs)¶
- map(**kwargs)¶
- memoize()¶
- pan(pos)¶
- record(key=None, redo=False)¶
- resample(**kwargs)¶
- reverse()¶
- run()¶
- scan(**kwargs)¶
- split(n=2)¶
Split one stream into many, so that it can be used as input in multiple places without recomputing output.
- zip(*others)¶
- aleatora.streams.core.const(*args, **kwargs)¶
- aleatora.streams.core.count(*args, **kwargs)¶
- aleatora.streams.core.defer(stream_fn)¶
- aleatora.streams.core.log(*args, **kwargs)¶
- aleatora.streams.core.repeat(*args, **kwargs)¶
- aleatora.streams.core.stream(thing)¶