473,587 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python MIDI in 2008

For the last couple of days, I've been looking for a Python midi
library. I'm generally interested in sending MIDI events via ALSA. It
seems like everything out there is pretty old; packages are from 2003
or 2005. Some packages don't seem to be really used, for instance
portmidi doesn't even support installing it system-wide; you can
compile it and... no make install for you.

What I've found so far:
- http://wiki.python.org/moin/PythonInMusic mostly point to non-
existing or very old software packages
- http://www.mxm.dk/products/public/pythonmidi/ -- no realtime support

Promising packages:
- http://trac2.assembla.com/pkaudio/browser/pyrtmidi -- something
realtime, but I couldn't get the actual Subversion repository address
- http://alumni.media.mit.edu/~harrison/code.html -- seems promising,
but I haven't got it running. You can't (system-wide) install
portmidi, and pyportmidi seems to want portmidi installed.

Is there any other package that allows sending MIDI events in real
time? Did anyone recently got any of the above packages to work?

Maciej
Jun 27 '08 #1
6 2743
On May 6, 6:01 pm, Maciej Bliziñski <maciej.blizin. ..@gmail.com>
wrote:
Is there any other package that allows sending MIDI events in real
time? Did anyone recently got any of the above packages to work?
There's MidiKinesis (http://www.sci.ccny.cuny.edu/~brinkman/software/
midikinesis/) which allows for midi events to be bound to X-Windows
events. It looks like it achieves this using ctypes to wrap around
the ALSA libs, which may be another approach to consider. The
MidiKineses codebase would be a good place to start if you wanted to
give that a try.

I'm sorry I can't be of much more help but please keep us posted on
what you find!

- alex23
Jun 27 '08 #2
Maciej Blizin'ski skrev:
For the last couple of days, I've been looking for a Python midi
library. I'm generally interested in sending MIDI events via ALSA. It
seems like everything out there is pretty old; packages are from 2003
or 2005.
existing or very old software packages
- http://www.mxm.dk/products/public/pythonmidi/ -- no realtime support

This is old in the sense that it has been a while since I wrote it. But
it is virtually bug free, so nothing much is happening.

The midi standard does not change so there is no real reason to
change/upgrade it.

It is currently being used by the very popular "frets on fire"

http://fretsonfire.sourceforge.net/d...tation/source/
It does not have real time support even though I did write it with that
support in mind. I just never got around to write it as I did not need
it myself.
I also developed it on Windows and I found it to be a bore to get real
time midi working.

It would probably be easier now that I am on Linux.
Well I just thought I would mention that it is not dead. Merely middle aged.
--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Jun 27 '08 #3
Maciej Bliziński wrote:
For the last couple of days, I've been looking for a Python midi
library. I'm generally interested in sending MIDI events via ALSA. It
seems like everything out there is pretty old; packages are from 2003
or 2005. Some packages don't seem to be really used, for instance
portmidi doesn't even support installing it system-wide; you can
compile it and... no make install for you.
I haven't used the PortMidi bindings that are in the Cheeseshop at
http://pypi.python.org/pypi/pyPortMidi/0.0.3

but I've used PortMidi extensively from C++ code and have had excellent
results with it.
Jun 27 '08 #4
In article <ma************ *************** ***********@pyt hon.org>,
Max M <ma**@mxm.dkwro te:
>
Well I just thought I would mention that it is not dead. Merely middle aged.
"'E's just resting!"
--
Aahz (aa**@pythoncra ft.com) <* http://www.pythoncraft.com/

Help a hearing-impaired person: http://rule6.info/hearing.html
Jun 27 '08 #5
On May 6, 7:43 pm, Max M <m...@mxm.dkwro te:
This is old in the sense that it has been a while since I wrote it. But
it is virtually bug free, so nothing much is happening.

The midi standard does not change so there is no real reason to
change/upgrade it.
Maybe you should add a method somehwere that does nothing much,
increment the version number and give it a 2008 date? ;)
Jun 27 '08 #6
On 6 Mai, 11:43, Max M <m...@mxm.dkwro te:
>
[Python Midi]
It does not have real time support even though I did write it with that
support in mind. I just never got around to write it as I did not need
it myself.

I also developed it on Windows and I found it to be a bore to get real
time midi working.

It would probably be easier now that I am on Linux.
I was previously quite interested in getting MIDI output working for a
game I wrote, and I suppose that the Python Midi package would have
been of interest (with pygame probably handling the interface to the
hardware), but given the bizarre kernel module gymnastics required to
support real-time output (and I still don't know if my sound hardware
actually supports MIDI directly or not), I decided in the end to use
timidity to generate normal audio files and to send those through the
sound system instead. Of course, that more or less eliminates any real-
time aspects.

Paul
Jun 27 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1470
by: Ton K. | last post by:
Folks, I'm planning to build MIDI sysex tools in Python on Windows 98SE. I need a simple read/write to MIDI interface, preferably with a read callback integrated with the Tkinter event loop. I don't need timestamps, sequencing etc... please advise on how to proceed... thanks Ton K.
0
2099
by: Max M | last post by:
If anybody is interrested in Midi, but are not on the Python Midi list, I will just notify that I have released the first version of a high level midi package for Python. It is fully functional. It reads and writes midi files! It is *very* easy to write your own event handlers to make midi files do whatever you want them to. It uses the...
23
1924
by: Spiffy | last post by:
hello, i'm fairly new to python programming and programming in general, but i have written a python prog that creates a MIDI file (.mid) and I want to be able to play it from another prog which is written in BASIC. It's a command-line prog that takes the MIDI filename as a parameter and plays the file. The 'Learning Python' book talks about...
52
5859
by: Dick Moores | last post by:
I need to figure out how to compute pi to base 12, to as many digits as possible. I found this reference, <http://mathworld.wolfram.com/Base.html>, but I really don't understand it well enough. Could someone show me how to do what I need? Thanks, Dick Moores rdm@rcblue.com
5
4171
by: Francois De Serres | last post by:
Hiho, could somebody please enlighten me about the mechanics of C callbacks to Python? My domain is more specifically callbacks from the win32 API, but I'm not sure that's where the problem lies. Here's a description... I want a callback-based MIDI input/processing, so PortMidi was not an alternative. I have written a C extension module...
1
2096
by: tim | last post by:
Someone using Python Midi Package from http://www.mxm.dk/products/public/ lately? I want to do the following : write some note events in a midi file then after doing that, put some controllers at the beginning of the midifile (because I want to be able to make those dependant on what notes were just written)
4
2684
by: sreekant | last post by:
Hi folks I hope someone here might be able to help. I scavenged some info and even code from the net and am trying to write a module that reads a text file and spits out a midi file. So far I managed to make it work to the level of reading a text file with appropriate notes, octaves, transposing, volume, aftertouch, polyphony,...
25
2316
by: Eric | last post by:
Hello, after reading some of the book Programming Python it seems that python is something I would like to delve deeper into. The only thing is, I have no idea what I should try and write. So I was hoping that someone here could help point me to a group/project that would be a good starting place for a person with limited python knowledge, but...
7
2417
by: Protocol | last post by:
Hello all Is Python suitable for building a multi-track midi sequencer (with a gui), that would run on windows / mac ? I fail to find sufficient information on this, being a newbie and all. Furthermore, i found references on Python not being really able of multi-threading, that further adds to the confusion. Please assist.
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.