python 标准输入设备,实时获取MIDI设备的输入(Python)
I've got a trigger finger (MIDI tablet) and I want to be able to read its input live and make python execute actions depending on the pressed key.
I need it for Windows, and preferably working with python 2.5 +
Thanks
解决方案
PyGame includes a built-in midi module, available for Linux, Windows and MacOS and is very well supported.
For example, here is the documentation for pygame.midi.Input:
Input is used to get midi input from midi devices.
Input(device_id)
Input(device_id, buffer_size)
Input.close - closes a midi stream, flushing any pending buffers. closes a midi stream, flushing any pending buffers.
Input.poll - returns true if there's data, or false if not. returns true if there's data, or false if not.
Input.read - reads num_events midi events from the buffer. reads num_events midi events from the buffer.
If you're looking for an alternative, have a look at PythonInMusic in the Python wiki.
There are various different projects related to MIDI input and output there, some for Windows as well. (Click the little > sign after each project to follow the link to the project homepage)
I have not used any of them personally, but I'm sure it will help you get started.
python 标准输入设备,实时获取MIDI设备的输入(Python)相关推荐
- python 标准输入设备_实时获取MIDI设备的输入(Python)
I've got a trigger finger (MIDI tablet) and I want to be able to read its input live and make python ...
- python中的标准输入设备_从MIDI设备获取输入(Python)
PyGame包含一个内置的 midi module,可用于Linux,Windows和MacOS,并得到很好的支持. Input is used to get midi input from midi ...
- python 自动获取所有设备信息-使用Python脚本来获取Cisco设备信息的示例
今天发现一个使用python写的管理cisco设备的小框架tratto,可以用来批量执行命令. 下载后主要有3个文件: Systems.py 定义了一些不同设备的操作系统及其常见命令. Connect ...
- 5个python标准库及作用_零基础编程——Python标准库使用
摘要 书接前文: 本文将讲解Python标准库内容,有操作系统接口os.文件路径通配符glob.命令行参数sys.正则表达式re.数学math.日期与时间.数据压缩.性能评估等,我们只需要知道有些什么 ...
- 导入python标准数学函数模块的语句_《Python编程快速上手——让繁琐工作自动化》——2.8 导入模块...
本节书摘来自异步社区<Python编程快速上手--让繁琐工作自动化>一书中的第2章,第2.8节,作者[美] Al Sweigart,王海鹏 译,更多章节内容可以访问云栖社区"异步 ...
- python 调用控制台并获取返回结果_Java调用Python脚本并获取返回值
在Java程序中有时需要调用Python的程序,这时可以使用一般的PyFunction来调用python的函数并获得返回值,但是采用这种方法有可能出现一些莫名其妙的错误,比如ImportError.在 ...
- python 标准模板库_比较了3个Python模板库
python 标准模板库 在我的日常工作中,我花费大量时间将各种来源的数据整理成人类可读的信息. 虽然在很多时候,这只是以电子表格或某种类型的图表或其他数据可视化的形式出现,但在其他情况下,有意义的是 ...
- python调用第三方接口获取数据_python调用接口,python接收post请求接口(附完整代码)...
与Scala语言相比,Python有其独特的优势和广泛的应用,python调用接口,因此Spark也推出了PySpark,它在框架上提供了一个使用Python语言的接口,python接收post请求接 ...
- python 调用pyautogui 实时获取鼠标的位置、移动鼠标
PyAutoGUI是一个纯Python的GUI自动化工具,其目的是可以用程序自动控制鼠标和键盘操作,利用它可以实现自动化任务 本章介绍了许多不同函数,下面是快速的汇总参考: moveTo(x,y)将鼠 ...
最新文章
- Java中创建泛型数组
- keras训练完以后怎么预测_使用Keras建立Wide Deep神经网络,通过描述预测葡萄酒价格...
- 《短文本数据理解(1)》一1.3 短文本理解框架
- unix 网络编程卷2 第43页 管道:open竟然会阻塞?
- 六、Numpy的使用(详解)
- Just For Fun-用java编个线性回归(一次函数拟合)的图形界面
- iOS FFmpeg 优秀博客(资源)集锦
- 使用Expression实现数据的任意字段过滤(1)
- 小乌龟(TortoiseGit)基本使用详解
- 如何用邮编查询API快速开发
- 【编程题】【Scratch三级】2021.06 躲球游戏
- Unix macOS 编写 who 命令
- 冲激函数与冲激函数相乘与冲激函数对冲激函数卷积之间的区别
- 如何将List集合存入数据库,解决方案
- nginx的启动,停止,重启命令(linux)
- 如何告别“人工运维”,借助算法进行告警关联挖掘分析?
- 如何解决计算机黑屏问题,电脑黑屏怎么处理(三个键教您解决黑屏问题)
- HDU3698-Let the light guide us (线段树优化的dp)
- 计算机与信息技术常用小工具
- 2013年9月、10月找工作总结篇
热门文章
- 圣斗士星矢重生服务器维护,11月26日全服停机维护公告
- 从EXCEL数据读到数据库
- excel行列互换_excel:关于选择性粘贴,你可能还不知道的操作
- 解决华硕电脑Ubuntu16.04连接不上wifi的问题
- 使用Origin根据数据画二维图(单x,双y)
- 全国计算机扥及考试c语言教程,【计算机】第1章 C语言绪论.ppt
- 【探花交友】阿里云OSS、百度人脸识别
- 网站域名服务器加密,网站域名利用https防劫持方法
- 【Java中实现微信公众号模板消息推送】
- WechatPay-API-v3接口规则