vishnubob / python-midi

Python MIDI library
MIT License
1.51k stars 369 forks source link

import midi.sequencer as sequencer ImportError: No module named sequencer #16

Open avaziyi opened 11 years ago

avaziyi commented 11 years ago

how to solve the problem when i tried the “scripts/”~ thanks

avaziyi commented 11 years ago

running 'setup' for python in Windows 8, 64bit ____“No sequencer available for 'win32' platform.” Why?

gileshall commented 11 years ago

It's not written. If you are interested in writing it, I would love to include it.

nathanstep55 commented 10 years ago

I'm experiencing the same problem. I want to be able to use the scripts, but I have one question. Will I be able to use the dumps regardless of that? (I modified the code to write on to a text file so I could get the full code properly)

mapio commented 10 years ago

I've tested many solutions under OS X and none of them seem to work. But Java provides very nice support for MIDI (on OS X too, of course). Would you be interested in evaluating an implementation based on Java/Jython? I'd be glad to write it if you would consider a merge…

vishnubob commented 10 years ago

What's important to me is low jitter, kernel level support. If you examine the ALSA layer I wrote many years ago, I carefully designed my sequencer to support ALSA queues, which means that MIDI events are schedule in kernel space, not user space (which is what RT-MIDI uses). I consider this a design requirement for any sequencer support. I am not interested in supporting any kind of jython/java mashup. Any OSX support (or windows support for that matter) must have a tight integration to that OS's MIDI queue to ensure the smallest jitter possible. My suggestion is to check out OSX CoreMidi and my SWIG based interface for ALSA for guidance.

mapio commented 10 years ago

I see and I perfectly understand you. Unfortunately, I'm not proficient as an OS X programmer and I don't have a clue about CoreMidi – I'm afraid I'll be unable to help :(

vishnubob commented 10 years ago

It's not an easy problem, but I appreciate the offer to help. If you are interested, there are other areas you can make an impact (writing tests, documentation, etc). Either way, I hope you get some good use from python-midi!

mapio commented 10 years ago

I'd like to help, so I'll check if I can actually do some of the things you suggest. And yes: I got quite a lot of fun using your library to develop https://github.com/mapio/markovdrummer with a student of mine!

vishnubob commented 10 years ago

That's awesome! I love hearing about what folks are using python-midi for, and that's a really cool project! I look forward to hearing where it goes!

ghost commented 9 years ago

Has this problem been solved? I tried "midiplay.py 128 0 mary.mid" and got this error "ImportError: No module named sequencer".

vishnubob commented 9 years ago

The only platform that supports the sequencer is on Linux. If you using python-midi on windows or OSX, there is no sequencer support.

L4in commented 8 years ago

I am using a Linux distribution and I also have the sequencer problem.

  File "/usr/local/bin/mididump.py", line 5, in <module>
    import midi
  File "build/bdist.linux-x86_64/egg/midi/__init__.py", line 6, in <module>
ImportError: No module named sequencer

The repo is freshly cloned and the sequencer is mentioned multiple times as a console of python setup.py install.

I took a look at the Travis tests and the sequencer is also a problem on this Linux machine.

vishnubob commented 8 years ago

Are you sure you have a clean repository? Perhaps you have installed an older version of the library, and you need to clean it out first? If you look at the current version of init.py, there is no "line 6" as reported by your traceback, so it doesn't look like you are executing the most recent code base. You might try installing under a virtualenv, and seeing if that clears up the problem. If it does, you will probably need to hunt through your python path, removing older versions of the midi package.

L4in commented 8 years ago

I had no memory of installing a midi egg, however pip uninstall midi did remove something I don't think I ever installed willingly. Perhaps some other project I installed did it on its own. Anyway, my problem is solved. Thanks a lot.

fornof commented 8 years ago

just did a git clone and then python setup.py , 2 errors, first was an error saying the version should be 2.3 ... instead of v2.3 , when I removed that I got a sequencer error stated above (I am on a mac)

can you hook up a sequencer used in this project? http://pedrokroger.net/converting-midi-files-mp3-mac-os/

crides commented 8 years ago

Experiencing the same problem. Not in the __init__.py, but rather in the mididumphw.py. I tried to dir(midi) after importing, but no sequencer. Maybe there is an error in the code.

Traceback (most recent call last):
File "./mididumphw.py", line 5, in <module>
    import midi.sequencer as sequencer
ImportError: No module named midi.sequencer
TheMLGuy commented 7 years ago

Trying to install midi, using python version 3.5.2 but Im getting an error when I use 'import midi'

 File "C:\Users\vashwin\AppData\Local\Continuum\Anaconda3\lib\site-packages\mid
i-0.2.3-py3.5.egg\midi__init__.py", line 1, in 
ImportError: No module named 'containers'

TheRealPhoneCall commented 7 years ago

Same problem for me. I ran midiplay, midilisten, And I had a clean and recent clone too.

bootsch commented 5 years ago

Hi There, I understand there's no sequencer for OSX but I would still like to use the module. To explain, I'm using the midi stream to create 3D animation in Maya. I have been using a nice module called 'midiparser.py' by Sean D. Spencer but it does not handle all the files I have.

So far python-midi does and I'm happy to have found it. Thanks. But instead of writting my own handling of the package/track lists I'm looking to use the sequencer.py.

I can install it myself but it would be nice to include it on install after all maybe (?)

widestreid00 commented 3 years ago

Getting this error running on unix

brian@brian-VirtualBox:~/Downloads$ mididumphw.py
Traceback (most recent call last):
  File "/usr/local/bin/mididumphw.py", line 4, in <module>
    __import__('pkg_resources').run_script('midi==0.2.3', 'mididumphw.py')
  File "/home/brian/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/brian/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1455, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python3.8/dist-packages/midi-0.2.3-py3.8.egg/EGG-INFO/scripts/mididumphw.py", line 5, in <module>
ModuleNotFoundError: No module named 'midi.sequencer'

although I don't know why because I was able to run pip install pymidi

I was also able to also run mididump.py

nsputnik commented 10 months ago

No sequencer available for 'darwin' platform. Has one been written yet?