Sonic
index

 
Classes
            
Array
MMap
ShortArray
Wavetable
SubArray
Buffer
Pipe
Tap
Task
Abs
Add
Copy
Delay
DspRd
DspRdWr
DspWr
Env
FileRd
FileWr
Fir
Gain
GetChar
GetInt
Hi
IIR
Interleave
Linear
Lo
Lookup
Loop
Mean
MemTask
MemRd
MemWr
Mix
Mix2
Mix4
Mix8
Noise
None_
Null
PARd
PARdWr
PAWr
RLo1
RLo2
RMS
RMod
Resample
Sin
Split
Squ
Term
Trace
Tri
Zero
_psyco
 
class Buffer
       Buffer(size): just some memory
 
   Methods defined here:
__del__(self)
__init__(self, size=4096)
#buffers={}
__repr__(self)
__str__(self)
append(self, p)
fill(self, task)
free(self)
pipe(self, task)
pull(self)
pull_free(self)
pull_reset(self)
pull_str(self, depth)
pull_visit(self)
push(self)
remove(self, p)
reset(self)
send(self)
sources(self)
targets(self)

Data and non-method functions defined here:
__doc__ = ' Buffer(size): just some memory '
__module__ = 'Sonic'
 
class Pipe
       Pipe(x,y): connects a Task to a Buffer (or vice-versa)
 
   Methods defined here:
__del__(self)
__init__(self, lhs, rhs)
__len__(self)
__repr__(self)
__str__(self)
close(self)
consume(self, i)
done(self)
free(self)
get_i(self)
get_limit(self)
get_rlimit(self)
info(self, depth)
limit(self, i)
no_limit(self)
produce(self, i)
pull(self)
pull_free(self)
pull_reset(self)
pull_str(self, depth=0)
pull_visit(self)
push(self)
read_short(self)
read_size(self)
reader_mem(self)
reader_request(self, size)
reset(self)
rlimit(self, i)
source(self)
sources(self)
target(self)
targets(self)
write_short(self, x)
write_size(self)
writer_mem(self)
writer_request(self, size)

Data and non-method functions defined here:
__doc__ = ' Pipe(x,y): connects a Task to a Buffer (or vice-versa) '
__module__ = 'Sonic'
 
class Task
       Task objects process signals 
obtained from Buffer objects (memory) 
via Pipe objects (smart pointers).
 
   Methods defined here:
__call__(self, *args)
__del__(self)
__init__(self, name='', *args)
__repr__(self)
__ror__(self, x)
__str__(self)
_print(self)
_reader_notify(self, rp)
_send(self)
_writer_notify(self, wp)
close_reader(self, p)
close_writer(self, p)
done(self)
free(self)
open_reader(self, buffer)
open_writer(self, buffer)
pipe(self, buf)
pull(self)
pull_free(self)
pull_reset(self)
pull_str(self, depth=0)
pull_visit(self)
pullpush(self)
push(self)
reader(self)
reset(self)
rotate_pull(self)
 when the path has loops
send(self)
source(self, *place)
sources(self)
target(self, *place)
targets(self)
writer(self)

Data and non-method functions defined here:
__doc__ = ' Task objects process signals \n obtained from... (memory) \n via Pipe objects (smart pointers).'
__module__ = 'Sonic'
 
class None_(Task)
       None_: do nothing
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' None_: do nothing '
__module__ = 'Sonic'
 
class Null(Task)
       Null(): trash all input
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' Null(): trash all input '
__module__ = 'Sonic'
 
class Zero(Task)
       write zero
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' write zero '
__module__ = 'Sonic'
 
class Copy(Task)
       copy input to output
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' copy input to output '
__module__ = 'Sonic'
 
class Add(Task)
       Add: output sum of all inputs
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' Add: output sum of all inputs '
__module__ = 'Sonic'
 
class Abs(Task)
       output absolute value of input
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' output absolute value of input '
__module__ = 'Sonic'
 
class RMod(Task)
       output product of inputs
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' output product of inputs '
__module__ = 'Sonic'
 
class Mean(Task)
       output average of inputs
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' output average of inputs '
__module__ = 'Sonic'
 
class Mix(Task)
       Mix(r=1.0): mix with gain=r
 
   Methods defined here:
__init__(self, r=1.0)

Data and non-method functions defined here:
__doc__ = ' Mix(r=1.0): mix with gain=r '
__module__ = 'Sonic'
 
class Mix2(Task)
       
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class Mix4(Task)
       
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class Mix8(Task)
       
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class Fir(Task)
       Fir(list_of_rs): generic finite impulse filter
 
   Methods defined here:
__init__(self, fir)

Data and non-method functions defined here:
__doc__ = ' Fir(list_of_rs): generic finite impulse filter '
__module__ = 'Sonic'
 
class Resample(Task)
       Resample(r): resample at rate r
 
   Methods defined here:
__init__(self, r)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' Resample(r): resample at rate r '
__module__ = 'Sonic'
 
class Split(Task)
       output left and right from stereo (interleaved) input
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' output left and right from stereo (interleaved) input '
__module__ = 'Sonic'
 
class Interleave(Task)
       output stereo (interleaved) from left and right inputs
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' output stereo (interleaved) from left and right inputs '
__module__ = 'Sonic'
 
class Gain(Task)
       Gain(r=1.0): ouptput input multiplied by r
 
   Methods defined here:
__init__(self, r=1.0)
get_r(self)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' Gain(r=1.0): ouptput input multiplied by r '
__module__ = 'Sonic'
 
class FileRd(Task)
       FileRd(filename): read a file
 
   Methods defined here:
__init__(self, filename)
seek(self, offset)
size(self)

Data and non-method functions defined here:
__doc__ = ' FileRd(filename): read a file '
__module__ = 'Sonic'
 
class FileWr(Task)
       FileWr(filename): write a file
 
   Methods defined here:
__init__(self, filename)

Data and non-method functions defined here:
__doc__ = ' FileWr(filename): write a file '
__module__ = 'Sonic'
 
class DspRdWr(Task)
       DspRdWr(dev,speed,stereo): read/write OSS soundcard
 
   Methods defined here:
__init__(self, dev=1, speed=44100, stereo=0)

Data and non-method functions defined here:
__doc__ = ' DspRdWr(dev,speed,stereo): read/write OSS soundcard '
__module__ = 'Sonic'
 
class DspRd(Task)
       DspRd(dev,speed,stereo): read OSS soundcard
 
   Methods defined here:
__init__(self, dev=1, speed=44100, stereo=0)

Data and non-method functions defined here:
__doc__ = ' DspRd(dev,speed,stereo): read OSS soundcard '
__module__ = 'Sonic'
 
class DspWr(Task)
       DspWr(dev,speed,stereo): write OSS soundcard
 
   Methods defined here:
__init__(self, dev=1, speed=44100, stereo=0)

Data and non-method functions defined here:
__doc__ = ' DspWr(dev,speed,stereo): write OSS soundcard '
__module__ = 'Sonic'
 
class PARdWr(Task)
       PARdWr(dev,speed,stereo): read/write portaudio device
 
   Methods defined here:
__init__(self, dev=1, speed=44100, stereo=0)

Data and non-method functions defined here:
__doc__ = ' PARdWr(dev,speed,stereo): read/write portaudio device '
__module__ = 'Sonic'
 
class PARd(Task)
       PARd(dev,speed,stereo): read portaudio device
 
   Methods defined here:
__init__(self, dev=1, speed=44100, stereo=0)

Data and non-method functions defined here:
__doc__ = ' PARd(dev,speed,stereo): read portaudio device '
__module__ = 'Sonic'
 
class PAWr(Task)
       PAWr(dev,speed,stereo): write portaudio device
 
   Methods defined here:
__init__(self, dev=1, speed=44100, stereo=0)

Data and non-method functions defined here:
__doc__ = ' PAWr(dev,speed,stereo): write portaudio device '
__module__ = 'Sonic'
 
class Sin(Task)
       Sin(f=440,r=1.0): generate a sin wave, freq=f, amplitude=r
 
   Methods defined here:
__init__(self, f=440.0, r=1.0)
set_f(self, f)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' Sin(f=440,r=1.0): generate a sin wave, freq=f, amplitude=r '
__module__ = 'Sonic'
 
class Squ(Task)
       Squ(f=440,r=1.0): generate a square wave
 
   Methods defined here:
__init__(self, f=440.0, r=1.0)
set_f(self, f)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' Squ(f=440,r=1.0): generate a square wave '
__module__ = 'Sonic'
 
class Tri(Task)
       Tri(f=440,r=1.0): generate a triangle wave
 
   Methods defined here:
__init__(self, f=440.0, r=1.0)
set_f(self, f)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' Tri(f=440,r=1.0): generate a triangle wave '
__module__ = 'Sonic'
 
class Noise(Task)
       Noise(): generate noise
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' Noise(): generate noise '
__module__ = 'Sonic'
 
class Lo(Task)
       Lo(r): low pass filter
 
   Methods defined here:
__init__(self, r)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' Lo(r): low pass filter '
__module__ = 'Sonic'
 
class RLo1(Task)
       RLo1(f,r): resonant low pass filter (1)
 
   Methods defined here:
__init__(self, f=440, r=0.96999999999999997)
set_f(self, f)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' RLo1(f,r): resonant low pass filter (1) '
__module__ = 'Sonic'
 
class RLo2(Task)
       RLo2(f,r): resonant low pass filter (2)
 
   Methods defined here:
__init__(self, f, r)
set_f(self, f)
set_r(self, r)

Data and non-method functions defined here:
__doc__ = ' RLo2(f,r): resonant low pass filter (2) '
__module__ = 'Sonic'
 
class Hi(Task)
       Hi(r): hi pass filter
 
   Methods defined here:
__init__(self, r)

Data and non-method functions defined here:
__doc__ = ' Hi(r): hi pass filter '
__module__ = 'Sonic'
 
class Env(Task)
       Env(): max abs of each block read
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' Env(): max abs of each block read '
__module__ = 'Sonic'
 
class RMS(Task)
       RMS(): root mean square over each block read
 
   Methods defined here:
__init__(self)

Data and non-method functions defined here:
__doc__ = ' RMS(): root mean square over each block read '
__module__ = 'Sonic'
 
class Tap
       
   Methods defined here:
__init__(self, tp)
set_i(self, i)
set_x(self, x)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class IIR(Task)
       IIR(line=[]): infinite impulse response filter
 
   Methods defined here:
__getitem__(self, idx)
__init__(self, line=[])
__len__(self)
add(self, i, x)

Data and non-method functions defined here:
__doc__ = ' IIR(line=[]): infinite impulse response filter '
__module__ = 'Sonic'
 
class Delay(Task)
       Delay(n): output is n samples behind input
 
   Methods defined here:
__init__(self, n)
set_n(self, n)

Data and non-method functions defined here:
__doc__ = ' Delay(n): output is n samples behind input '
__module__ = 'Sonic'
 
class Trace(Task)
       Trace(x,y,w,h): SDL graphical display of signal
 
   Methods defined here:
__init__(self, x=0, y=0, w=640, h=480)

Data and non-method functions defined here:
__doc__ = ' Trace(x,y,w,h): SDL graphical display of signal '
__module__ = 'Sonic'
 
class Lookup(Task)
       Lookup(buf=None): use input as index into values in buf
 
   Methods defined here:
__init__(self, b=None)
flush(self)

Data and non-method functions defined here:
__doc__ = ' Lookup(buf=None): use input as index into values in buf'
__module__ = 'Sonic'
 
class Linear(Task)
       Linear(v,x_init=0): linear spline, 
v is a list of (width,level) pairs
 
   Methods defined here:
__getitem__(self, idx)
__init__(self, v, x_init=0)
__len__(self)
__setitem__(self, idx, val)
__str__(self)
append(self, di, x)
pop(self)
update(self, l)

Data and non-method functions defined here:
__doc__ = ' Linear(v,x_init=0): linear spline, \n v is a list of (width,level) pairs '
__module__ = 'Sonic'
 
class Term(Task)
       Term(cb=None): ncurses interface, outputs keypresses, behaves like a dict of lines: term[0]="foo"
 
   Methods defined here:
__del__(self)
__init__(self, cb=<function <lambda>>)
__setitem__(self, key, s)

Data and non-method functions defined here:
__doc__ = ' Term(cb=None): ncurses interface, outputs keypresses, behaves like a dict of lines: term[0]="foo" '
__module__ = 'Sonic'
 
class GetChar(Task)
       
   Methods defined here:
__init__(self, cb=<function <lambda>>, *data)
get_char(self, rp)
send(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class GetInt(Task)
       
   Methods defined here:
__init__(self, cb=<function <lambda>>, *data)
get_int(self, rp)
send(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class Loop(Task)
       Loop(filename)
Loop(array,sz=None)
Loop(mem,sz)
 
   Methods defined here:
__init__(self, *args)
clone(self)
get_offset(self)
seek(self, offset)
 offset is bytecount

Data and non-method functions defined here:
__doc__ = ' Loop(filename)\n Loop(array,sz=None)\n Loop(mem,sz) '
__module__ = 'Sonic'
 
class MemTask(Task)
       
   Methods defined here:
__init__(self, name, array, sz)
clone(self)
get_offset(self)
seek(self, offset)
 offset is bytecount

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class MemRd(MemTask)
       
  
Method resolution order:
MemRd
MemTask
Task

Methods defined here:
__init__(self, array, sz=None)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class MemWr(MemTask)
       
  
Method resolution order:
MemWr
MemTask
Task

Methods defined here:
__init__(self, array, sz=None)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class Array
       
   Methods defined here:
__del__(self)
__getitem__(self, i, value)
__init__(self, sz, itemsz=1)
sz is byte count
__setitem__(self, i, value)
__str__(self)
free(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class MMap(Array)
       
   Methods defined here:
__init__(self, filename)
__str__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class SubArray(Array)
       
   Methods defined here:
__init__(self, array, start, end)
__str__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class ShortArray(Array)
       
   Methods defined here:
__init__(self, sz)
sz is short count

Data and non-method functions defined here:
__doc__ = None
__module__ = 'Sonic'
 
class Wavetable(ShortArray)
       build from callable on 0<=x<1
 
  
Method resolution order:
Wavetable
ShortArray
Array

Methods defined here:
__init__(self, func, dx)

Data and non-method functions defined here:
__doc__ = ' build from callable on 0<=x<1 '
__module__ = 'Sonic'
 
Functions
            
_find(name)
_print(x)
asctime(...)
asctime([tuple]) -> string
 
Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.
When the time tuple is not present, current time as returned by localtime()
is used.
c2py(s, n)
clock(...)
clock() -> floating point number
 
Return the CPU time or real time since the start of the process or since
the first call to clock().  This has as much precision as the system records.
connect = pipe(*args)
ctime(...)
ctime(seconds) -> string
 
Convert a time in seconds since the Epoch to a string in local time.
This is equivalent to asctime(localtime(seconds)). When the time tuple is
not present, current time as returned by localtime() is used.
file_exists(fnam)
free_garbage()
free_msg(s)
ftos(f)
get_msg(s)
gmtime(...)
gmtime([seconds]) -> (tm_year, tm_mon, tm_day, tm_hour, tm_min,
                       tm_sec, tm_wday, tm_yday, tm_isdst)
 
Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.
GMT).  When 'seconds' is not passed in, convert the current time instead.
localtime(...)
localtime([seconds]) -> (tm_year,tm_mon,tm_day,tm_hour,tm_min,tm_sec,tm_wday,tm_yday,tm_isdst)
 
Convert seconds since the Epoch to a time tuple expressing local time.
When 'seconds' is not passed in, convert the current time instead.
log(*s)
mk_msg()
mkloop(func, dx)
mktime(...)
mktime(tuple) -> floating point number
 
Convert a time tuple in local time to seconds since the Epoch.
null_log()
output(s)
pipe(*args)
set_log(file)
sleep(...)
sleep(seconds)
 
Delay execution for a given number of seconds.  The argument may be
a floating point number for subsecond precision.
strftime(...)
strftime(format[, tuple]) -> string
 
Convert a time tuple to a string according to a format specification.
See the library reference manual for formatting codes. When the time tuple
is not present, current time as returned by localtime() is used.
strptime(...)
strptime(string, format) -> tuple
 
Parse a string to a time tuple according to a format specification.
See the library reference manual for formatting codes (same as strftime()).
time(...)
time() -> floating point number
 
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.
xcheck()
xmark()
 
Data
             MSG_LEN = 128
StringTypes = (<type 'str'>, <type 'unicode'>)
__file__ = './Sonic.pyc'
__name__ = 'Sonic'
accept2dyear = 1
altzone = -39600
aupyrc = '/home/simon/.aupyrc'
daylight = 1
generators = _Feature((2, 2, 0, 'alpha', 1), (2, 3, 0, 'final', 0), 4096)
logfile = <open file '<stdout>', mode 'w'>
nested_scopes = _Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'alpha', 0), 16)
outstr = {}
psyco = <Sonic._psyco instance>
rcfile = <open file '/home/simon/.aupyrc', mode 'r'>
s = 'bufsz = 2048 \nbufsz = 1024 \nbufsz = 4096 # defau...z = 16\ndsp=(1, 44100, 0) # device, speed, stereo\n'
timezone = -36000
tzname = ('EST', 'EST')