显示HN:Pianoterm – 从你的钢琴上运行shell命令。一个Linux CLI工具
Show HN: Pianoterm – Run shell commands from your Piano. A Linux CLI tool

原始链接: https://github.com/vustagc/pianoterm

从你的钢琴Linux CLI工具运行shell命令,将shell命令分配到USB MIDI键盘上的按键。注意:假定使用ALSA作为声卡驱动。使用acconnect -i查找所需的midi端口。 $HOME/.config/pianoterm/config # 这是一条注释 # 触发可以是on_release或on_press on_press # 语法:端口 = 命令 # 使用aseqdump -p <端口>查找特定的键码 21 = playerctl previous # 88键键盘上的第一个键 22 = playerctl play-pause 23 = playerctl next # ... 108 = /home/me/my_script.sh git clone https://github.com/vustagc/pianoterm.git cd pianoterm && make C编译器 alsactl (1.2.15.2) make (可选)

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Show HN: Pianoterm – 从你的钢琴运行 shell 命令。一个 Linux CLI 工具 (github.com/vustagc) 6 分,来自 vustagc 44 分钟前 | 隐藏 | 过去 | 收藏 | 讨论 一个小周末项目,让我可以在学习歌曲时直接在钢琴上暂停/播放/倒带。帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Run shell commands from your piano

Linux CLI tool to assign shell commands to keys on a USB MIDI Keyboard

Note: Assumes ALSA is used as the soundcard driver Use acconnect -i to find the desired midi port

  • $HOME/.config/pianoterm/config
# this is a comment
#
# trigger can be on_release or on_press
on_press

# syntax: port = command
# use aseqdump -p <port> to find specific keycodes

21 = playerctl previous # first key on an 88-key keyboard
22 = playerctl play-pause
23 = playerctl next
# ...
108 = /home/me/my_script.sh
git clone https://github.com/vustagc/pianoterm.git
cd pianoterm && make
  • C compiler
  • alsactl (1.2.15.2)
  • make (optional)
联系我们 contact @ memedata.com