dbxdriverack package

Subpackages

Module contents

Protocol and common functions for connecting to and controlling the dbx DriveRack series of devices.

class dbxdriverack.CmdBuilder(action: str, target: str, **kwargs: Any)

Bases: object

Factory base class for generating commands to send to a DriveRack device over the network. Specific functions of a specific DriceRack should override the _generateCmd() method to implement the specific protocols.

get() list[str]
dbxdriverack.dB2float(dB: str) float

Converts a dB string (e.g. “-10dB”, “0 dB”) to a float

Parameters:

dB (str) – String representation of a dB value

Returns:

Numeric representation of the dB value

Return type:

float

Raises:

ValueError – Unable to parse the dB value

dbxdriverack.freq2Hz(freq: str) float

Converts an audio frequency string to a float (in Hz)

Parameters:

freq (str) – Frequency string (e.g. “1 kHz”, “300Hz”)

Returns:

Numeric representation of the frequency in Hz

Return type:

float

Raises:

ValueError – Unable to parse the frequency value

dbxdriverack.percent2float(percent: str, multiplier: int = 1) float

Converts a percentage string to a float

Parameters:
  • percent (str) – Percentage string (e.g. “10%”, “100 %”)

  • multiplier (int, optional) – Multiplier for the percentage, by default 1

Returns:

Numeric representation of the percentage (e.g. 0.1, 1.0)

Return type:

float

Raises:

ValueError – Unable to parse the percentage value

dbxdriverack.ratio2numerator(ratio: str) str

Extracts the numerator from a ratio string

Parameters:

ratio (str) – Ratio string (e.g. “2:1”, “Inf:1”)

Returns:

Numerator of the ratio

Return type:

str

Raises:

ValueError – Unable to parse the ratio value

dbxdriverack.time2sec(time: str) float

Converts a time string to a float (in seconds)

Parameters:

time (str) – Time string (e.g. “10ms”, “1 s”)

Returns:

Numeric representation of the time in seconds

Return type:

float

Raises:

ValueError – Unable to parse the time value