[ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Discuss anything new and newsworthy! See http://planet.linuxaudio.org and https://libreav.org/news for more Linux Audio News!

Announcements of proprietary software may fit better in the Marketplace.


Moderators: raboof, MattKingUSA, khz

Post Reply
capocasa
Established Member
Posts: 6
Joined: Thu Jun 19, 2025 4:07 pm
Been thanked: 3 times

[ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Post by capocasa »

Hello, everyone!

I made an ultra-precise virtual MIDI keyboard to groove out directly on your computer keyboard :) Give it a try and feel the difference. In my humble opinion the timing is good enough to consider your computer a serious musical instrument, at least for things like organs that traditionally aren't touch sensitive.

It has no user interface and is a bit technical to install for the very first version, I hope to figure out how to make it friendlier in time while staying ultra-minmalistic.

Feedback always welcome!

https://github.com/capocasa/mash

PS: I fulfilled an almost 20 year dream with this one- My first attempt at a virtual keyboard, shelljam, worked okay but had issues and I eventually stopped using it. This one has everything I learned from it, it gets a lot more right :)

leondustar
Established Member
Posts: 4
Joined: Mon Jun 23, 2025 2:03 pm

Re: [ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Post by leondustar »

really cool!

Does SDL apps also have this problem?
If so, as a milkytracker developer, I would love to see this in milkytracker too.

capocasa
Established Member
Posts: 6
Joined: Thu Jun 19, 2025 4:07 pm
Been thanked: 3 times

Re: [ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Post by capocasa »

Hi! Thank you so much for replying! This is my first piece of finished audio software so it is very exciting to make an impact to the extent of one forum reply :)

Yes, SDL uses window system inputs from various operating systems so it will have that problem.

Milkytracker is awesome! I'll have to have a closer look.

To use the code, I suppose i could provide a libmash library with a C interface where you could poll for timestamped events.

Another option would be to translate the Nim code to C++. Nim compiles to C so it maps fairly well.

sjomae
Established Member
Posts: 17
Joined: Wed Aug 09, 2023 11:15 am
Been thanked: 4 times

Re: [ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Post by sjomae »

Written in nim, interesting. What made you choose nim over zig for example? As you can use c libraries in zig directly.

capocasa
Established Member
Posts: 6
Joined: Thu Jun 19, 2025 4:07 pm
Been thanked: 3 times

Re: [ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Post by capocasa »

I'm sure Zig is a great language and solves a few of C's problems. Nut Nim is a whole new paradigm because you don't have to chose between fast programming and fast programs any more: The language is extremely expressive and still very fast.

It's also flexible enough to adapt low-level stuff to its style. For example, say you have a powerful C library called foo.

Code: Select all

FooHandle handle = init_foo();
do_stuff(handle);
printf("%i", handle->data[57])  // better not go over length
destroy_foo(handle);  // better not forget to call this

You wrap it with Nim and add a few lines of code, you can have this, with no runtime overhead.

Code: Select all

withFoo as foo:
  foo.doStuff()
  echo foo.data[57]  # bounds checked
  # GC calls destroy_foo.
sjomae
Established Member
Posts: 17
Joined: Wed Aug 09, 2023 11:15 am
Been thanked: 4 times

Re: [ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Post by sjomae »

Ok, personally I think Zig would be a great fit for linuxaudio, looking at the project goals of Zig it tries to improve programming and the software in a broad way, with a build system, crossplatform compilation, compatible with C etc. Improving C while avoiding the complexity of C++ and Rust. I don't know Nim, but reading some discussions about it comparing to Zig, to me Zig looks a more sustainable option in the long run.

But yeah, grab what works for you I guess, especially for such a specific (small) tool.

capocasa
Established Member
Posts: 6
Joined: Thu Jun 19, 2025 4:07 pm
Been thanked: 3 times

Re: [ANN] Mash 0.1.1 Ultra-precise headless MIDI virtual keyboard for Jack

Post by capocasa »

Nim's been around for over a decade and can target anything, but let's continue this in a different thread I just made :) (If you like)

Post Reply