{"id":15962494,"url":"https://github.com/vrslev/jack_server","last_synced_at":"2025-05-07T03:06:37.659Z","repository":{"id":37979735,"uuid":"454373408","full_name":"vrslev/jack_server","owner":"vrslev","description":"Control JACK audio server with Python","archived":false,"fork":false,"pushed_at":"2025-01-27T08:17:28.000Z","size":149,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T09:18:21.586Z","etag":null,"topics":["jack","jackaudio","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vrslev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-01T12:10:22.000Z","updated_at":"2025-01-27T08:17:30.000Z","dependencies_parsed_at":"2023-02-12T21:16:29.011Z","dependency_job_id":"5e01de83-9b17-42c9-9e22-ad3e21f72b70","html_url":"https://github.com/vrslev/jack_server","commit_stats":{"total_commits":184,"total_committers":4,"mean_commits":46.0,"dds":0.5597826086956521,"last_synced_commit":"4d71a976d25d960326b245412489a496c058e5d7"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrslev%2Fjack_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrslev%2Fjack_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrslev%2Fjack_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrslev%2Fjack_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrslev","download_url":"https://codeload.github.com/vrslev/jack_server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249714659,"owners_count":21314889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jack","jackaudio","python"],"created_at":"2024-10-07T16:04:03.896Z","updated_at":"2025-04-19T14:31:24.121Z","avatar_url":"https://github.com/vrslev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Test](https://github.com/vrslev/jack_server/actions/workflows/test.yml/badge.svg)](https://github.com/vrslev/jack_server/actions/workflows/test.yml)\n\nControl [JACK](https://jackaudio.org/) audio server with Python.\nCan be used as replacement for [jackd](https://manpages.debian.org/buster/jackd2/jackd.1.en.html) for more robust configuration, for example, when using [`jack`](https://github.com/spatialaudio/jackclient-python) package.\n\n## Installation\n\n`pip install jack_server`\n\nAlso you need to have `jackserver` library on your machine, it comes with [JACK2](https://github.com/jackaudio/jack2). I had problems with apt-package on Ubuntu (`jackd2`), if you do too, compile jack yourself.\n\n## Usage\n\n### 🎛 `jack_server.Server`\n\nOn server creation you _can_ specify some parameters:\n\n```python\nimport jack_server\n\nserver = jack_server.Server(\n    name=\"myfancyserver\",\n    sync=True,\n    realtime=False,\n    driver=\"coreaudio\",\n    device=\"BuiltInSpeakerDevice\",\n    rate=48000,\n    period=1024,\n    # nperiods=2  # Work only with `alsa` driver\n)\nserver.start()\n\ninput()\n```\n\nThey are actually an equivalent of `jackd` flags:\n\n- `-n`, `--name` to `name`,\n- `-S`, `--sync` to `sync`,\n- `-R`, `--realtime`, `-r`, `--no-realtime` to `realtime`,\n- `-d` to `driver`,\n\nAnd driver arguments:\n\n- `-d`, `--device` to `device`,\n- `-r`, `--rate` to `rate`,\n- `-p`, `--period` to `period`,\n\n#### `start(self) -\u003e None`\n\n_Open_ and _start_ the server. All state controlling methods are idempotent.\n\n#### `stop(self) -\u003e None`\n\nStop and close server.\n\n#### `driver: jack_server.Driver`\n\nSelected driver.\n\n#### `name: str`\n\nActual server name. It is property that calls C code, so you can actually set the name.\n\n#### `sync: bool`\n\nWhether JACK runs in sync mode. Useful when you`re trying to send and receive multichannel audio.\n\n#### `realtime: bool`\n\nWhether JACK should start in realtime mode.\n\n#### `params: dict[str, jack_server.Parameter]`\n\nServer parameters mapped by name.\n\n### 💼 `jack_server.Driver`\n\nDriver (JACK backend), can be safely changed before server is started. Not supposed to be created by user code.\n\n#### `name: str`\n\nDriver name, read-only.\n\n#### `device: str`\n\nSelected device.\n\n#### `rate: jack_server.SampleRate`\n\nSampling rate.\n\n#### `period: int`\n\nBuffer size.\n\n#### `nperiods: int`\n\nNumber of periods. 2 is right for motherboard, PCI, PCI-X, etc.; 3 for USB ([source](https://wiki.archlinux.org/title/JACK_Audio_Connection_Kit)).\n\nCan be helpful when tailoring performance on jittery systems.\n\n#### `params: dict[str, jack_server.Parameter]`\n\nDriver parameters mapped by name.\n\n### 📻 `jack_server.SampleRate`\n\nValid sampling rate, `44100` or `48000`.\n\n### 🔻 `jack_server.Parameter`\n\nNot supposed to be created by user code.\n\n#### `name: str`\n\nRead-only verbose name of parameter.\n\n#### `value: int | str | bytes | bool`\n\nValue of the parameter, can be changed.\n\n### ❗️ `jack_server.set_info_function(callback: Callable[[str], None] | None) -\u003e None`\n\nSet info output handler. By default JACK does is itself, i. e. output is being printed in stdout.\n\n### ‼️ `jack_server.set_error_function(callback: Callable[[str], None] | None) -\u003e None`\n\nSet error output handler. By default JACK does is itself, i. e. output is being printed in stderr.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrslev%2Fjack_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrslev%2Fjack_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrslev%2Fjack_server/lists"}