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 withpt- 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. |
| Parameters | card | a snapshot.Card
instance.
|
| module | a snapshot.Module
instance.
| |
| ts_type | default is |
| Parameters | source | a 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 |
| Parameters | reference | The reference signal. Can be anything with a get_datafeed
method, like a SpeechChannel, a
VMPrx or a TDMrx.
|
| nonlinear | enable/disable non-linear processing. | |
| use_agc | enable/disable automatic gain control on the input signal. | |
fix_agc: enable/disable fixed gain. Related Aculab documentation: sm_path_echocancel. | ||
| Parameters | agc | enable 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. |
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.| Parameters | mixin | the 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. |