{"id":16345435,"url":"https://github.com/unclechu/midihaskey","last_synced_at":"2025-10-26T01:31:36.483Z","repository":{"id":43801683,"uuid":"116306056","full_name":"unclechu/MIDIHasKey","owner":"unclechu","description":"MIDIHasKey — Virtual MIDI keyboard suitable for microtonal music","archived":false,"fork":false,"pushed_at":"2022-07-18T00:41:04.000Z","size":303,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-31T13:06:11.374Z","etag":null,"topics":["audio","audio-processing","cplusplus","cpp","haskell","jack","jackaudio","keyboard","microtonal","midi","midi-keyboard","wxwidgets"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unclechu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-04T20:47:42.000Z","updated_at":"2024-03-27T03:18:15.000Z","dependencies_parsed_at":"2022-08-31T20:41:56.149Z","dependency_job_id":null,"html_url":"https://github.com/unclechu/MIDIHasKey","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2FMIDIHasKey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2FMIDIHasKey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2FMIDIHasKey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2FMIDIHasKey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unclechu","download_url":"https://codeload.github.com/unclechu/MIDIHasKey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238241409,"owners_count":19439767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-processing","cplusplus","cpp","haskell","jack","jackaudio","keyboard","microtonal","midi","midi-keyboard","wxwidgets"],"created_at":"2024-10-11T00:31:45.550Z","updated_at":"2025-10-26T01:31:31.184Z","avatar_url":"https://github.com/unclechu.png","language":"Haskell","readme":"# MIDIHasKey\n\nVirtual MIDI keyboard for microtonal music.\n\nIt works with [JACK Audio Connection Kit](http://jackaudio.org/) but technically it can work with\nanything you name. You’d just have to create an application or a script that handles the events that\nare coming from MIDIHasKey’s stdout.\n\nOne of the main reasons to create MIDIHasKey is to use all keyboard keys efficiently in context of\nmicrotonal music.  For example [Jack Keyboard](http://jack-keyboard.sourceforge.net/) is trying to\nsimulate the feel of a real piano keyboard by imitating its layout of white and black keys. It\ndoesn’t make any sense for microtonal scales such as 17tet, 19tet, 22tet and many other. Those\nscales won’t be devided in equal octaves on the piano keyboard, and we have some unused keys,‥ so\nwasteful when we have just about 2 and half octaves in 12tet scale and even less in other micro\nscales.\n\n![Screenshot](artwork/readme-screenshot.png)\n\n## WARNING!\n\n**Work in progress! It’s playable but some stuff can be changed or is only partially implemented.**\n\nSee https://github.com/metachronica/audio-midihaskey/projects/1 page that about progress of first\nrelease.\n\nFor now you can:\n* Play notes by pressing keys on keyboard you set to handle\n* Play notes by pressing GUI buttons\n* Trigger note-offs for everything by pressing `Panic` button\n* Change base pitch, octave, MIDI channel to play to\n* Store settings between application restarts\n\n## Supported OS\n\n* GNU/Linux\n\n## Requirements\n\n* [GTK3](https://www.gtk.org/)\n* [JACK Audio Connection Kit](http://jackaudio.org/)  \n  For included C++ JACK MIDI Player application. It’s optional (if you have your own app for that)\n  because MIDIHasKey just writes events to stdout (in its own format) and you can redirect it\n  wherever you want.  \n  **TODO** For me: Document the MIDI Player API. For now you can reverse-engeneer it by looking\n  inside [this file](midiplayer-jack-cpp/src/main.c++) for instance. It also will change in the\n  future.\n* [GCC](https://gcc.gnu.org/) __\u003e=6.4.*__ (maybe lower, but must support C++17)  \n  To build C++ JACK MIDI Player (it’s optional too if you use your own one).\n\n## Usage\n\n### Using [Nix](https://nixos.org/nix/)\n\nNix is the recommended way to run it.\n\nYou can run it just from a nix-shell:\n\n``` sh\nnix-shell --arg with-midihaskey true --arg with-midiplayer-jack-cpp true --run 'midihaskey /dev/input/by-id/usb-xxxx_yyyy-event-kbd | midiplayer-jack-cpp'\n```\n\nWhere `/dev/input/by-id/usb-xxxx_yyyy-event-kbd` is your keyboard device path\n(you must have access to read from that file for your current user).\n\n#### Tuning `nix-shell`\n\nLook at [default.nix](default.nix)’s arguments to see available options.\n\n##### Development mode for C++ JACK MIDI Player\n\n``` sh\nnix-shell -A midiplayer-jack-cpp\n```\n\n#### Build and run\n\n``` sh\nnix-build -A midihaskey.exe -o result-midihaskey\nnix-build -A midiplayer-jack-cpp -o result-midiplayer-jack-cpp\nresult-midihaskey/bin/midihaskey /dev/input/by-id/usb-xxxx_yyyy-event-kbd | result-midiplayer-jack-cpp/bin/midiplayer-jack-cpp\n```\n\n##### Test against newer GHC\n\nHere is an example how to build using GHC 9.2.3\n(HLS is failing to build at the moment):\n\n``` sh\nnix-build --argstr ghcVersion ghc923 --arg withHLS false -o result-test-ghc923\n```\n\n#### Dev tools for Haskell apps\n\nNix setup for nix-shell includes [HLS] turned on by default.\nIf you use Vim here is how you can configure [vim-lsp] plugin to use it:\n\n``` viml\nif executable('haskell-language-server-wrapper')\n  aug HaskellLsp\n  au! User lsp_setup cal lsp#register_server({\n    \\ 'name': 'hls',\n    \\ 'cmd': {server_info-\u003e['haskell-language-server-wrapper', '--lsp']},\n    \\ 'allowlist': ['haskell'],\n    \\ })\n  aug END\nen\n```\n\n##### direnv\n\nSee [.envrc example file](.envrc.example).\nSee [direnv.net](https://direnv.net) if you are not familiar with direnv.\n\n### Using [Stack](https://haskellstack.org)\n\n``` sh\nstack build --install-ghc\n(cd midiplayer-jack-cpp \u0026\u0026 make)\nstack exec -- midihaskey /dev/input/by-id/usb-xxxx_yyyy-event-kbd | midiplayer-jack-cpp/build/midiplayer-jack-cpp\n```\n\n# Author\n\nViacheslav Lotsmanov\n\n# License\n\n[GNU/GPLv3](LICENSE)\n\n[HLS]: https://github.com/haskell/haskell-language-server\n[vim-lsp]: https://github.com/prabirshrestha/vim-lsp\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fmidihaskey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funclechu%2Fmidihaskey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fmidihaskey/lists"}