https://github.com/bradleynull/keystation-interface
Interface class for working with the USB M-Audio Keystation32
https://github.com/bradleynull/keystation-interface
keystationmini32 python3 pyusb
Last synced: about 1 year ago
JSON representation
Interface class for working with the USB M-Audio Keystation32
- Host: GitHub
- URL: https://github.com/bradleynull/keystation-interface
- Owner: bradleynull
- License: gpl-3.0
- Created: 2018-02-03T21:46:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-03T22:11:44.000Z (over 8 years ago)
- Last Synced: 2025-06-02T02:39:43.248Z (about 1 year ago)
- Topics: keystationmini32, python3, pyusb
- Language: Python
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KeystationMini32 Interface
A simple Python class for interfacing with the USB M-Audio KeystationMini32.
This will probably work for more classes of keyboards, but I just wanted it for
the 32 for now. Feel free to contribute!
## Setup
Just install the a virtual environment with the requirements file provided.
You'll want to look at the
[pyusb installation instructions](https://github.com/pyusb/pyusb) when
installing. You should only need `libusb` up and running.
```bash
$ virtualenv ./venv
...
$ . ./venv/bin/activate
(venv) $ pip install -r ./requirements.txt
Collecting pyusb==1.0.2 (from -r ./requirements.txt (line 1))
Installing collected packages: pyusb
Successfully installed pyusb-1.0.2
```
## Usage
```python
import keystation
def button_callback(button):
...
def key_callback(note, velocity):
...
keyboard = keystation.Keystation32()
keyboard.add_button_callback(button_callback)
keyboard.add_key_callback(key_callback)
keyboard.open()
... wait forever or at least some amount of time
keyboard.close()
```