Class a.s.Path(object):

Part of aculab.switching View Source View In Hierarchy

Path objects can be used for mixing, echo cancellation, automatic gain control and pitch shifting.

Logging: Path names are prefixed with pt- and the log name is switch.
Method __init__ Allocate a Path for signal transformation.
Method close Close the path.
Method __del__ Undocumented
Method listen_to Listen to a timeslot or a tx instance.
Method get_datafeed Get the datafeed. Part of the switching protocol.
Method echocancel Cancel the echo from the input.
Method stop_echocancel Stop echo cancellation.
Method agc Configure automatic gain control and fixed volume adjustments.
Method pitchshift Configure pitch shifting on a signal.
Method mix Mix with another signal. The signal from mixin is added to the
Method stop_mix Stop mixing.
Method get_status Get the status of the path.
def __init__(self, card, module, ts_type=lowlevel.kSMTimeslotTypeALaw): (source)
Allocate a Path for signal transformation.
Parameterscarda snapshot.Card instance.
modulea snapshot.Module instance.
ts_type

default is kSMTimeslotTypeALaw

Related Aculab documentation: sm_config_module_switching.
def close(self): (source)

Close the path.

Related Aculab documentation: sm_path_destroy.
def __del__(self): (source)
Undocumented
def listen_to(self, source, tdm=None): (source)
Listen to a timeslot or a tx instance.
Parameterssourcea tuple (stream, timeslot, [timeslot_type]) or a transmitter instance (VMPtx, FMPtx or TDMtx), which must be on the same module.
tdm

Used internally.

Applications should normally use switching.connect.

Related Aculab documentation: sm_path_datafeed_connect.
def get_datafeed(self): (source)
Get the datafeed. Part of the switching protocol.
def echocancel(self, reference, nonlinear=False, use_agc=False, fix_agc=False, span=0): (source)
Cancel the echo from the input.
ParametersreferenceThe reference signal. Can be anything with a get_datafeed method, like a SpeechChannel, a VMPrx or a TDMrx.
nonlinearenable/disable non-linear processing.
use_agcenable/disable automatic gain control on the input signal.

fix_agc: enable/disable fixed gain.

Related Aculab documentation: sm_path_echocancel.
def stop_echocancel(self): (source)

Stop echo cancellation.

Related Aculab documentation: sm_path_echocancel.
def agc(self, agc=True, volume=0): (source)
Configure automatic gain control and fixed volume adjustments.
Parametersagcenable automatic gain control.
volume

The volume in dB, in the range from -24 to 8.

The fixed volume adjustment is done after automatic gain control.

Related Aculab documentation: sm_path_agc.
def pitchshift(self, shift=0.0): (source)

Configure pitch shifting on a signal.

param shift: Pitch shift in octaves. Values higher than 1 cause an upward shift, values lower than 0.0 cause a downward shift.

Example: to pitch down a semitone, use -0.08333 (-1/12).

Related Aculab documentation: sm_path_pitchshift.
def mix(self, mixin, volume=-6): (source)
Mix with another signal. The signal from mixin is added to the signal processed by this path, and the result is adjusted accorded to the volume.
Parametersmixinthe signal to mix in. Anything with a get_datafeed method, like a SpeechChannel, a VMPrx or a TDMrx. These must be on the same module.
volume

Volume adjustment in dB. The default is -6, which prevents the resulting signal from being louder than the original.

Related Aculab documentation: sm_path_mix.
def stop_mix(self): (source)

Stop mixing.

Related Aculab documentation: sm_path_mix.
def get_status(self): (source)
Get the status of the path.
API Documentation for pyAculab, generated by pydoctor at 2009-01-02 15:12:29.