0

I have been working on a midi application (as in: controlled by a MIDI keyboard) in Python on Linux by hooking myself up to Alsaseq. Now I am trying to port the thing over to Windows. My question is: does Windows have an equivalent abstraction layer to ALSA? By this I mean a solution that hides the USB-magic away - I would wish to try this with a virtual keyboard too. To my understanding there is a thing called MIDI mapper, but it doesn't seem to work as an input.

I am working with a non-standard installation of Python. Shipping rtaudio is not feasible and PyGame's event loop is a no-go.

To those who don't know what ALSA is, it is Linux's sound system (or one of many) and stands for Advanced Linux Sound Architecture. It handles both raw audio and formatted data like MIDI. As it doesn't concern itself with device drivers for MIDI keyboards, it provides an interface that hides whether a given input device is a physical or telepathical Keyboard.

Mörkö
  • 211
  • 1
  • 14
  • Possible duplicate of [Getting input from MIDI devices live (Python)](http://stackoverflow.com/questions/1554896/getting-input-from-midi-devices-live-python) – CL. Jan 01 '17 at 20:20
  • I would disagree (if I can say that having asked the question): first, I am unable to use PyGame and second, I am more interested in how Windows behaves internally than the Python magic. I think solving the actual code problem will be another battle. The flaw I could see with the question would rather be it being off-topic for SO. – Mörkö Jan 01 '17 at 20:22
  • I know almost nothing about MIDI, and absolutely nothing about ALSA, but does the [MIDI API](https://msdn.microsoft.com/en-us/library/dd743619(v=vs.85).aspx) meet your needs? There's a section titled [Recording MIDI Audio](https://msdn.microsoft.com/en-us/library/dd798629(v=vs.85).aspx) if that's relevant. And [this](https://msdn.microsoft.com/en-us/library/dd743688(v=vs.85).aspx) suggests that a MIDI keyboard can be an input source. – Harry Johnston Jan 01 '17 at 23:10
  • Looks nice, I will have a look at that when I can. What language did that target? A C/++/# -type thing? – Mörkö Jan 02 '17 at 08:58
  • The documentation is written for C/C++ but it can be used in any language that allows you to call Win32 API functions. – Harry Johnston Jan 03 '17 at 01:51

0 Answers0