https://github.com/wevah/sndctl
A small utility for controlling sound output from the command line on macOS.
https://github.com/wevah/sndctl
audio macos
Last synced: 11 months ago
JSON representation
A small utility for controlling sound output from the command line on macOS.
- Host: GitHub
- URL: https://github.com/wevah/sndctl
- Owner: Wevah
- License: other
- Created: 2017-11-08T01:45:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-14T20:04:36.000Z (over 3 years ago)
- Last Synced: 2025-06-16T22:41:13.290Z (about 1 year ago)
- Topics: audio, macos
- Language: C
- Size: 101 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sndctl
v1.3.1 (2023)
by Nate Weaver (Wevah)
https://derailer.org/
A small utility for controlling sound output from the command line on macOS.
$ sndctl -v volume
$ sndctl -b balance
Volume and balance are from `0.0` to `1.0`, translated to volume as min/max, and to balance as left/right.
For balance, `l`, `r`, and `c`, are aliases for `0.0`, `1.0`, and `0.5`, respectively.
Capitalize `V` or `B` to display the volume or balance.
Pass `--visual` with `V` and/or `B` to display volume and balance as ASCII sliders.
List output devices and supported properties with `--list`/`-l` (colored if `CLICOLOR` is set):
```console
$ sndctl -l
44: Display Audio
has volume: yes
has balance: yes
65: External Headphones
has volume: yes
has balance: no
53: MacBook Pro Speakers
has volume: yes
has balance: no
```
(See the man page/help for more options.)
I originally wrote this to easily correct the output balance after rebooting:
$ sndctl -b c
Note: Getting/setting the balance on some outputs on Apple Silicon macs doesn't work.
----
© 2017-2023 Nate Weaver (Wevah)/Derailer