Control JACK audio server with Python.
Can be used as replacement for jackd for more robust configuration, for example, when using jack package.
Installation
pip install jack_server
Also you need to have jackserver library on your machine, it comes with JACK2. I had problems with apt-package on Ubuntu (jackd2), if you do too, compile jack yourself.
Usage
🎛 jack_server.Server
On server creation you can specify some parameters:
import jack_server
server = jack_server.Server(
name="myfancyserver",
sync=True,
realtime=False,
driver="coreaudio",
device="BuiltInSpeakerDevice",
rate=48000,
period=1024,
# nperiods=2 # Work only with `alsa` driver
)
server.start()
input()
They are actually an equivalent of jackd flags:
-n,--nametoname,-S,--synctosync,-R,--realtime,-r,--no-realtimetorealtime,-dtodriver,
And driver arguments:
-d,--devicetodevice,-r,--ratetorate,-p,--periodtoperiod,
start(self) -> None
Open and start the server. All state controlling methods are idempotent.
stop(self) -> None
Stop and close server.
driver: jack_server.Driver
Selected driver.
name: str
Actual server name. It is property that calls C code, so you can actually set the name.
sync: bool
Whether JACK runs in sync mode. Useful when you`re trying to send and receive multichannel audio.
realtime: bool
Whether JACK should start in realtime mode.
params: dict[str, jack_server.Parameter]
Server parameters mapped by name.
💼 jack_server.Driver
Driver (JACK backend), can be safely changed before server is started. Not supposed to be created by user code.
name: str
Driver name, read-only.
device: str
Selected device.
rate: jack_server.SampleRate
Sampling rate.
period: int
Buffer size.
nperiods: int
Number of periods. 2 is right for motherboard, PCI, PCI-X, etc.; 3 for USB (source).
Can be helpful when tailoring performance on jittery systems.
params: dict[str, jack_server.Parameter]
Driver parameters mapped by name.
📻 jack_server.SampleRate
Valid sampling rate, 44100 or 48000.
🔻 jack_server.Parameter
Not supposed to be created by user code.
name: str
Read-only verbose name of parameter.
value: int | str | bytes | bool
Value of the parameter, can be changed.
❗️ jack_server.set_info_function(callback: Callable[[str], None] | None) -> None
Set info output handler. By default JACK does is itself, i. e. output is being printed in stdout.
‼️ jack_server.set_error_function(callback: Callable[[str], None] | None) -> None
Set error output handler. By default JACK does is itself, i. e. output is being printed in stderr.
Metadata
Release files for jack-server 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jack_server-0.2.0.tar.gz | 7.9 kB | Without provenance | Details for jack_server-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jack_server-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for jack_server-0.2.0-py3-none-any.whl |
Total release size: 16.8 kB
Release files / jack_server-0.2.0.tar.gz
| Download URL | jack_server-0.2.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd1838510cef2275110bf39c85faecbd24462c80b8c119c8d24b701e8285ad61
|
|
BLAKE2b-256 checksum How to use checksums |
47c255f6b52c7fdfbbf06f84c13c23f0d0ae9bb56e23749fca27b807a0c3909c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / jack_server-0.2.0-py3-none-any.whl
| Download URL | jack_server-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc7e263c714377f58b4b75bc7546e75c916e07c1dc3a9e9175657b54b84a5bc2
|
|
BLAKE2b-256 checksum How to use checksums |
6a11804a6a2e5a2ef0890d19f00a4e709942e1f1ff7494ff9d38241f528a4ede
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for jack-server 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.