isine

Use this example from an interactive python session, for example:

>>> from isine import change
>>> change(880)

Module Contents

Classes

SinePlayer

A class that represents a thread of control.

Functions

nearest_frequency(frequency)

generate(frequency[, duration])

Attributes

sampling_rate

format

pack_format

channels

isine

isine.sampling_rate = 48000
isine.format
isine.pack_format = 'h'
isine.channels = 2
isine.nearest_frequency(frequency)
isine.generate(frequency, duration=0.125)
class isine.SinePlayer(frequency=440.0)

Bases: threading.Thread

A class that represents a thread of control.

This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass.

change(frequency)

This is called outside of the player thread

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

isine.isine