HIDI - flexible HID to MIDI translation layer

HIDI

Flexible HID to MIDI translation layer no china usb midi Ultimate successor of keyboard2000 and keyboard3000 projects.

Purpose of this project

This application is a translation layer between HID devices like keyboards or gamepads and MIDI interface with a bunch of useful features:

  • Any number of customized MIDI mappings, easily switchable by a precise binding, currently included Piano and Accordion (chromatic layout like lumatone or LinnStrument)
  • Making use of analog gamepad input to control things such as pitch-bend or CC (also configurable).
  • octave (F1-F2), semitone (F3-F4), mapping (F5-F6) channel (F7-F8) controls.
  • customizable multinote mode with just one press of a button, simply hold any number of desired additional intervals and press F9. Press again without holding any notes to disable multinote mode.
  • non-lazy note emitting implementation, user can conveniently change device state on the fly (octave, semitone, channel) even when some notes are already pressed, NoteOff events will be emitted correctly anyway. However, panic button (ESC) is also available just in case.
  • NKRO keyboards support (if it can be enabled in hardware by some key-sequence)
  • You can connect whatever number of HID devices you want, completely dynamically!

Initial status of the project

It is just in usable state as a beta release, but already feature-rich and stable.
There is a small list of missing functionality that I want to implement:

  • YAML configurations for devices, currently configurations are hardcoded and can be only changed by modifying the code.
  • Arpeggiator and other MIDI effects, MIDI clock sync
  • a few tiny refactorizations, implement missing features in holoplot's go-evdev library, other related upkeep tasks in the codebase
  • performance improvements in the field of monitoring for connected devices, currently /proc/bus/input/devices is being parsed every second, it can be implemented much more efficiently
  • Precompiled builds targeted for more platforms
  • MIDI sequencer, only if there are keyboards available with full LED control over Linux input subsystem (wishlist)

Requirements

  • Application is designed to be run under a Linux machine, it can be run under Raspberry Pi zero, it can be run on x64 dedicated tower PC
  • In the case of Pi Zero, thing like USB HAT may be very useful
  • decent MIDI interface, please avoid cheap china USB interfaces, it has problem with receiving data (unless you have old version lying around, it may work just fine). Here is my recommendation: no china usb midi
  • If you don't have spare MIDI ports on your PC, two identical USB MIDI interfaces with some DIN 5p bridges may be useful
  • Keyboards, gamepads :)

Usage

  • ./build.sh provides a simple way to compile program for Raspberry Pi zero, beta release is also available to download.
  • ./hidi -h for available options:
Usage of ./hidi:
  -debug
        enable debug logging
  -mididevice int
        select N-th midi device, default: 0 (first)
  • if necessary, add permission for execution with chmod +x hidi
  • just run by ./hidi

example stdout:

mapping up (Accordion) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:50 > Note On : D 1 (channel: 1, velocity: 64) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:50 > Note Off: D 1 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:50 > Note On : D# 1 (channel: 1, velocity: 64) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:51 > Note Off: D# 1 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:51 > Note On : E 1 (channel: 1, velocity: 64) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:51 > Note Off: E 1 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:51 > Note On : F 1 (channel: 1, velocity: 64) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:51 > Note Off: F 1 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:54 > octave up (1) [HOLTEK USB-HID Keyboard] 2021/12/25 10:18:56 > semitone up (1) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:00 > semitone up (2) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:08 > Note On : B 1 (channel: 1, velocity: 64) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:08 > Note On : B 2 (channel: 1, velocity: 64) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:09 > Multinote mode engaged, intervals: [12]/[Perfect octave] [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:13 > Note Off: B 1 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:13 > Note Off: B 2 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:13 > Note Off: B 2 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:13 > Note Off: B 3 (channel: 1, velocity: 0) [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:17 > Bruh, no pressed notes, multinote mode disengaged [HOLTEK USB-HID Keyboard] 2021/12/25 10:19:44 > Note On : C 1 (channel: 1, velocity: 64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:19:44 > Note Off: C 1 (channel: 1, velocity: 0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:19:49 > octave up (1) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:19:49 > Note On : C 2 (channel: 1, velocity: 64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:19:50 > Note Off: C 2 (channel: 1, velocity: 0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:19:57 > Note On : D 0 (channel: 1, velocity: 64) [Microsoft X-Box One S pad] 2021/12/25 10:19:57 > Note Off: D 0 (channel: 1, velocity: 0) [Microsoft X-Box One S pad] 2021/12/25 10:19:59 > Note On : C 0 (channel: 1, velocity: 64) [Microsoft X-Box One S pad] 2021/12/25 10:19:59 > Note Off: C 0 (channel: 1, velocity: 0) [Microsoft X-Box One S pad] 2021/12/25 10:20:06 > Control Change: 4, value: 20 (channel: 1) [Microsoft X-Box One S pad] 2021/12/25 10:20:06 > Control Change: 4, value: 87 (channel: 1) [Microsoft X-Box One S pad] 2021/12/25 10:20:06 > Control Change: 4, value: 127 (channel: 1) [Microsoft X-Box One S pad] 2021/12/25 10:20:08 > Control Change: 4, value: 92 (channel: 1) [Microsoft X-Box One S pad] 2021/12/25 10:20:08 > Control Change: 4, value: 17 (channel: 1) [Microsoft X-Box One S pad] 2021/12/25 10:20:08 > Control Change: 4, value: 0 (channel: 1) [Microsoft X-Box One S pad] 2021/12/25 10:21:45 > Note On : D# 1 (channel: 2, velocity: 64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:21:46 > channel up ( 3) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:21:48 > Note Off: D# 1 (channel: 2, velocity: 0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:21:50 > Note On : D# 1 (channel: 3, velocity: 64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard] 2021/12/25 10:21:51 > Note Off: D# 1 (channel: 3, velocity: 0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]">
2021/12/25 10:18:39 New Devices: 3
2021/12/25 10:18:39 - [Keyboard], "Kingston HyperX Alloy FPS Mechanical Gaming Keyboard", 5 handlers
2021/12/25 10:18:39 - [Keyboard], "HOLTEK USB-HID Keyboard", 6 handlers
2021/12/25 10:18:39 - [Joystick], "Microsoft X-Box One S pad", 1 handlers
2021/12/25 10:18:45 > mapping up (Accordion) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:50 > Note On : D  1 (channel:  1, velocity:  64) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:50 > Note Off: D  1 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:50 > Note On : D# 1 (channel:  1, velocity:  64) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:51 > Note Off: D# 1 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:51 > Note On : E  1 (channel:  1, velocity:  64) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:51 > Note Off: E  1 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:51 > Note On : F  1 (channel:  1, velocity:  64) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:51 > Note Off: F  1 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:54 > octave up (1) [HOLTEK USB-HID Keyboard]
2021/12/25 10:18:56 > semitone up (1) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:00 > semitone up (2) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:08 > Note On : B  1 (channel:  1, velocity:  64) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:08 > Note On : B  2 (channel:  1, velocity:  64) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:09 > Multinote mode engaged, intervals: [12]/[Perfect octave] [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:13 > Note Off: B  1 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:13 > Note Off: B  2 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:13 > Note Off: B  2 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:13 > Note Off: B  3 (channel:  1, velocity:   0) [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:17 > Bruh, no pressed notes, multinote mode disengaged [HOLTEK USB-HID Keyboard]
2021/12/25 10:19:44 > Note On : C  1 (channel:  1, velocity:  64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:19:44 > Note Off: C  1 (channel:  1, velocity:   0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:19:49 > octave up (1) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:19:49 > Note On : C  2 (channel:  1, velocity:  64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:19:50 > Note Off: C  2 (channel:  1, velocity:   0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:19:57 > Note On : D  0 (channel:  1, velocity:  64) [Microsoft X-Box One S pad]
2021/12/25 10:19:57 > Note Off: D  0 (channel:  1, velocity:   0) [Microsoft X-Box One S pad]
2021/12/25 10:19:59 > Note On : C  0 (channel:  1, velocity:  64) [Microsoft X-Box One S pad]
2021/12/25 10:19:59 > Note Off: C  0 (channel:  1, velocity:   0) [Microsoft X-Box One S pad]
2021/12/25 10:20:06 > Control Change:   4, value:  20 (channel:  1) [Microsoft X-Box One S pad]
2021/12/25 10:20:06 > Control Change:   4, value:  87 (channel:  1) [Microsoft X-Box One S pad]
2021/12/25 10:20:06 > Control Change:   4, value: 127 (channel:  1) [Microsoft X-Box One S pad]
2021/12/25 10:20:08 > Control Change:   4, value:  92 (channel:  1) [Microsoft X-Box One S pad]
2021/12/25 10:20:08 > Control Change:   4, value:  17 (channel:  1) [Microsoft X-Box One S pad]
2021/12/25 10:20:08 > Control Change:   4, value:   0 (channel:  1) [Microsoft X-Box One S pad]
2021/12/25 10:21:45 > Note On : D# 1 (channel:  2, velocity:  64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:21:46 > channel up ( 3) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:21:48 > Note Off: D# 1 (channel:  2, velocity:   0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:21:50 > Note On : D# 1 (channel:  3, velocity:  64) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]
2021/12/25 10:21:51 > Note Off: D# 1 (channel:  3, velocity:   0) [Kingston HyperX Alloy FPS Mechanical Gaming Keyboard]

Have fun!

Owner
Similar Resources

A simple self-hostable Machine Translation service, powered by spaGO

A simple self-hostable Machine Translation service, powered by spaGO

Nov 9, 2022

Python library for the DeepL language translation API.

The DeepL API is a language translation API that allows other computer programs to send texts and documents to DeepL's servers and receive high-quality translations.

Jan 6, 2023

Read from standard input and output a Haags translation of the given input.

haags Read from standard input and output a Haags translation of the given input. Building make && sudo make install You may also run go build on syst

Oct 23, 2022

An easy-to-use OCR and Japanese to English translation tool

An easy-to-use OCR and Japanese to English translation tool

Manga Translator An easy-to-use application for translating text in images from Japanese to English. The GUI was created using Gio. Gio supports a var

Dec 28, 2022

Azure translation SDK For Golang

azure-translate Azure translation SDK Example key := "YOUR-SUBSCRIPTION-KEY" location := "global" client := translate.NewClient(key, location) result

Mar 15, 2022

☔🎀 Translation made with simplicity, yet robust. ~ Backend portion of Arisu, made in Go.

☔ Tsubaki Website • Discord • Discussions Translation made with simplicity, yet robust. Made with 💖 using TypeScript, React with Next.js. Tsubaki is

Jan 13, 2022

Prosper - General app launcher with support for translation, calc, currency and unit conversion.

Prosper - General app launcher with support for translation, calc, currency and unit conversion.

Prosper Description General app launcher with support for translation, calc, currency and unit conversion. Global shortcut is Option (Alt) + Space Fea

Dec 6, 2022

DuckAGoGo - CLI Application for quick searches and translation

DuckAGoGo - CLI Application for quick searches and translation

DuckAGoGo CLI Application for quick searches and translation DuckAGoGo lets you

Jan 10, 2022

Complete Translation - translate a document to another language

 Complete Translation - translate a document to another language

Complete Translation This project is to translate a document to another language. The initial target is English to Korean. Consider this project is no

Feb 25, 2022

Database Abstraction Layer (dbal) for Go. Support SQL builder and get result easily (now only support mysql)

godbal Database Abstraction Layer (dbal) for go (now only support mysql) Motivation I wanted a DBAL that No ORM、No Reflect、Concurrency Save, support S

Nov 17, 2022

igor is an abstraction layer for PostgreSQL with a gorm like syntax.

igor igor is an abstraction layer for PostgreSQL, written in Go. Igor syntax is (almost) compatible with GORM. When to use igor You should use igor wh

Jan 1, 2023

Scalable, fault-tolerant application-layer sharding for Go applications

ringpop-go (This project is no longer under active development.) Ringpop is a library that brings cooperation and coordination to distributed applicat

Jan 5, 2023

Abstraction layer for simple rabbitMQ connection, messaging and administration

Abstraction layer for simple rabbitMQ connection, messaging and administration

Jazz Abstraction layer for quick and simple rabbitMQ connection, messaging and administration. Inspired by Jazz Jackrabbit and his eternal hatred towa

Dec 12, 2022

Golang Event Scheduling Sample Using Postgresql Database as persisting layer.

Database Based Event Scheduling Example that demonstrates super basic database based event scheduling. To run this example; Copy .env.example to .env

Nov 28, 2022

A distributed Configuration Center server that manages config in a container. The container is composed of fields (abstract layer includes: KV, LIST, DICT type). The Field contains basic datatypes (int, float, bool, string, list, dict).

A distributed Configuration Center server that manages config in a container. The container is composed of fields (abstract layer includes: KV, LIST, DICT type). The Field contains basic datatypes (int, float, bool, string, list, dict).

cassem config assembler from key-value pairs' container which include basic datatypes, such as int, string, float, bool, list, dict Features HTTP Rest

Nov 1, 2022

A modern layer 7 load balancer from baidu

BFE BFE is a modern layer 7 load balancer from baidu. Advantages Multiple protocols supported, including HTTP, HTTPS, SPDY, HTTP2, WebSocket, TLS, Fas

Dec 30, 2022

REST Layer, Go (golang) REST API framework

REST Layer, Go (golang) REST API framework

REST Layer REST APIs made easy. REST Layer is an API framework heavily inspired by the excellent Python Eve. It helps you create a comprehensive, cust

Dec 16, 2022

A course to build the SQL layer of a distributed database.

TinySQL TinySQL is a course designed to teach you how to implement a distributed relational database in Go. TinySQL is also the name of the simplifed

Jan 8, 2023

Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

upper/db is a productive data access layer (DAL) for Go that provides agnostic tools to work with different data sources

Jan 3, 2023
Comments
  • Version number in release titles?

    Version number in release titles?

    Hello! I've added HIDI to libreav.org, a site that aggregates release feeds, though when items on https://github.com/gethiox/HIDI/releases are given a title, that is carried through to https://github.com/gethiox/HIDI/releases.atom and overwrites the default version string which makes it impossible to parse the version number from titles. Could I request that the titles be prefixed with the number?

  • HIDI 0.9-beta

    HIDI 0.9-beta

    • OpenRGB support for arm-v6/v7, arm64 and amd64
    • YAML configurations for devices. automatic reload on user configuration changes
    • note collision handlers
    • Monitoring of input handlers is now a magnitude more efficient
    • Graceful app termination
    • greatly improved speed of application start and termination
    • Fixed input device grabbing for exclusive usage
    • CC learn action - easier way to learn CC with unstable analog input, also useful for multi-axis analog sticks
    • configurable deadzones for analog input
    • analog events throttling
    • improved overall performance when logging is disabled
    • Precompiled builds for various platforms
    • Embedded config directory, if config directory doesn't exist, application will create default one
    • Automatic update of factory configurations (if there are new ones or modified).
    • Support for optional HD44780 screen (20x4) for displaying statistics
    • Relatively good default configurations for keyboards and gamepads
    • informative and eye-candy debug/logging
Pigiron is a MIDI routing utility with an extensive OSC interface.

Pigiron README (c) 2021 Steven Jones Pigiron is a fully configurable MIDI routing utility written in Go. It includes a MIDI file player and has a comp

Nov 24, 2022
Tracker-style microtonal MIDI sequencer

Faunatone A tracker-style microtonal MIDI sequencer. Since MIDI does not have any widely-implemented native support for microtonality, Faunatone uses

Oct 25, 2022
MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.

BGPiano MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets. Usage bgpiano-send and bgpiano-recv Po

Jun 9, 2022
Simple translation tool using google translation api.

Translator Simple translation tool using google translation api. To use it you have to provide a valid service account as json file with path in the e

Feb 1, 2022
EasyMidi is a simple and reliable library for working with standard midi file (SMF)

EasyMidi EasyMidi is a simple and reliable library for working with standard midi file (SMF). Installing A step by step series of examples that tell y

Sep 21, 2022
Software modular synthesizer with Midi support

go-modular A software modular synthesizer with Midi support. !! Warning: High amplitude sounds can cause serious ear damage. Lower your headphone volu

Mar 31, 2022
Pigiron is a MIDI routing utility with an extensive OSC interface.

Pigiron README (c) 2021 Steven Jones Pigiron is a fully configurable MIDI routing utility written in Go. It includes a MIDI file player and has a comp

Nov 24, 2022
Tracker-style microtonal MIDI sequencer

Faunatone A tracker-style microtonal MIDI sequencer. Since MIDI does not have any widely-implemented native support for microtonality, Faunatone uses

Oct 25, 2022
MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets.

BGPiano MIDI tunneling through BGP, for times when you want to broadcast your music instead of your IP packets. Usage bgpiano-send and bgpiano-recv Po

Jun 9, 2022
Go online translation package

Translate Go online translation package Install go get github.com/nuveo/translate Available Translator API's Microsoft or send us the next Translator

Nov 27, 2022