Questions tagged [pyportmidi]

pyPortMidi is a Python wrapper for PortMidi, a cross-platform C library for real-time MIDI control.

pyPortMidi is a Python wrapper for PortMidi, a cross-platform C library for real-time MIDI control (Win32, Linux, and OS X; latest update 2005): http://alumni.media.mit.edu/~harrison/code.html

11 questions
3
votes
1 answer

Is it possible to find out which USB port a MIDI device is connected to in portmidi / pyportmidi

I'm connecting a several identical USB-MIDI devices and talking to them using Python and pyportmidi. I have noticed that when I run my code on Linux, occasionally the MIDI ports of the devices are enumerated in a different order, so I send messages…
rjmunro
  • 27,203
  • 20
  • 110
  • 132
3
votes
1 answer

Sending lots of data with pyportmidi stops working unless I add delay

I'm trying to talk to a Novation Launchpad with pyportmidi. I have noticed that if I just keep sending it instructions using midiOut.WriteShort() it will process the first 100 or so, then loose the rest. I guess that there is a buffer somewhere that…
rjmunro
  • 27,203
  • 20
  • 110
  • 132
3
votes
1 answer

How do you get midi events using python-rtmidi

The documentation for python-rtmidi is basically the worse that it is ever written. I'm trying to figure out how to get midi event data using that program. The data I want is something like this [ I'm not even sure if python-rtmidi can get that…
bobsmith76
  • 160
  • 1
  • 9
  • 26
3
votes
1 answer

"PortMidi: `Bad pointer'" when closing mido port

My code: import mido import time mido.set_backend('mido.backends.pygame') output = mido.open_output() output.send(mido.Message('note_on', note=64, velocity=60)) time.sleep(3) output.close() After the last line, the following error is…
Aviv Cohn
  • 15,543
  • 25
  • 68
  • 131
3
votes
1 answer

Write Midi Sequence to file

I Have a console program, written in C, which generates short random musical compositions using the PortMidi library. Ultimately I would like to write these sequences as either a midi or audio file. I have found some explanations of reading and…
Harry J
  • 31
  • 1
1
vote
1 answer

How to access and change Pygame.midi?

I'm using Pygame.midi and you can select from 127 instruments. I want to know how I can change/add midi instruments to this list. Is there a list of pygame.midi instruments anywhere and if not what libraries is pygame using to actually do midi? I've…
Greg James
  • 15
  • 4
1
vote
1 answer

Invalid MIDI message Data when I'm trying to send Control Change Messages

I'm using pygame.midi library to send MIDI Messages (Control Change messages, not notes). The idea is to send from the output (from this python program) to the input of another program. >>> import time >>> import pygame.midi as midi >>> midiout =…
Mr_LinDowsMac
  • 2,644
  • 9
  • 56
  • 75
1
vote
1 answer

Is there a way to get pyPortMidi working on Win7-64?

I'm trying to use pyPortMidi for an application that I build for OSX, win32, and win64. I've gotten it to work on OSX and win32, but I am stuck trying to get it working on win64. pyPortMidi is a wrapper for a C library named PortMidi, and it is…
LMO
  • 515
  • 7
  • 18
0
votes
0 answers

How do I get Python to talk to the portmidi c library on Windows 11/64

I'm trying to get portmidi working with Python on Windows 11/64.  I'm able to compile the dll/lib in MSVS without errors, without specifying any changes or options.  I'm new to this, so I don't know how to tell the system about the libraries, do I…
user1441998
  • 459
  • 4
  • 14
0
votes
1 answer

Can I live capture midi with rtmidi while using Ableton?

I'm creating a pygame that renders midi notes on a grid and I'd like to be able to use the same midi input through Ableton at the same time. Right now I'm using this to capture: inport = mido.open_input(synth_name) msg = inport.receive() Is there a…
nmowery
  • 81
  • 1
  • 1
  • 2
0
votes
1 answer

Freezing with no error codes using non-standard library

I'm doing some work with a MIDI controller called the Novation Launchpad that has a python module available to import and use. My code keeps getting stuck on the line LP = launchpad.Launchpad(). So here is how I've attempted to de-bug: import…
amitchone
  • 1,630
  • 3
  • 21
  • 45