quasimoto.sampler
index
/home/vkottler/src/vkottler/workspace/quasimoto/quasimoto/sampler/__init__.py

A module implementing sampler interfaces.

 
Package Contents
       

 
Classes
       
collections.abc.Iterable(builtins.object)
Sampler

 
class Sampler(collections.abc.Iterable)
    Sampler(num_bits: int = 16, sample_rate: int = 44100, duration_s: float = None, frequency: float = 261.63, time: float = 0.0, amplitude: float = 1.0) -> None
 
A base class for iterable sampler interfaces.
 
 
Method resolution order:
Sampler
collections.abc.Iterable
builtins.object

Methods defined here:
__copy__(self: ~T) -> ~T
Create a copy of this instance.
__init__(self, num_bits: int = 16, sample_rate: int = 44100, duration_s: float = None, frequency: float = 261.63, time: float = 0.0, amplitude: float = 1.0) -> None
Initialize this instance.
__iter__(self) -> collections.abc.Iterator[int]
Return an iterator.
__next__(self) -> int
Get the next value from this sampler.
advance(self, steps: int = 1) -> bool
Advance time forward.
copy(self: ~T, harmonic: int = None, duration_s: float = None) -> ~T
Get a copy of this instance.
harmonic(self, index: int) -> float
Get a harmonic frequency based on this instance's frequency.
sin(self, now: float) -> int
Get a raw sin value sample.
value(self, now: float) -> int
Get the next value.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__orig_bases__ = (collections.abc.Iterable[int],)

Class methods inherited from collections.abc.Iterable:
__class_getitem__ = GenericAlias(...) from abc.ABCMeta
Represent a PEP 585 generic type
 
E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
__subclasshook__(C) from abc.ABCMeta
Abstract classes can override this to customize issubclass().
 
This is invoked early on by abc.ABCMeta.__subclasscheck__().
It should return True, False or NotImplemented.  If it returns
NotImplemented, the normal algorithm is used.  Otherwise, it
overrides the normal algorithm (and the outcome is cached).

 
Data
        DEFAULT_BITS = 16
DEFAULT_FREQUENCY = 261.63
DEFAULT_SAMPLE_RATE = 44100
T = ~T