Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some additional findings [not a bug] #1

Open
thisfred opened this issue Jun 7, 2020 · 2 comments
Open

Some additional findings [not a bug] #1

thisfred opened this issue Jun 7, 2020 · 2 comments

Comments

@thisfred
Copy link

thisfred commented Jun 7, 2020

First of all, thank you Łukasz, for the wonderful pycon presentation, and this really inspiring library!

I've tried to get things working on Linux (a somewhat older Ubuntu), and mostly things just work, so that may be a thing that could be noted in the documentation (though I totally understand if you didn't want to add that so as not to have to support it, but perhaps this issue will be helpful to others looking to do similar things in the future.)

For RTMidi to work I had to install the following header packages:

  • libasound2-dev
  • libjack-dev

I also worked around a fairly different hardware setup:

I don't have any hardware that can function as a MIDI sequencer so I installed seq24 and had it send MIDI clock events to a MIDI through port.

I have two volca's (beats and nubass) that I'm driving, but they don't have USB, so I got some cheap USB to 5 pin MIDI cables, which works right away. I'm not sure if it's the cables or that my elderly laptop is not processing the queue fast enough, but I ran into a lot of missing notes, and pretty widely varying pulse delta's. The way I solved this was to not send the clock events through to the synths, since they don't really need the clock, when they get the notes sent to them. (It does lose the nice synced step lights, though.)

Hope this helps someone in the future, if there is a better place to put this please let me know, and thanks again, driving hardware synths from Python is turning out to be so much fun!

@ambv
Copy link
Owner

ambv commented Jun 19, 2020

Thanks for your time to write your feedback. Yeah, installing rtmidi might require additional libraries on your system.

As for not processing the queue fast enough, that's surprising. Even older computers should have plenty of power to do MIDI which is very low bandwidth. It's likely that you got yourself into some MIDI loop. What I mean by this is a situation where:

  • aiotone (A) sends a MIDI message to a device (B)
  • B receives the MIDI message, and sends it back on its out port
  • A receives the MIDI message, and sends it back to B

Lo and behold, a loop created. This occasionally happens to me when I misconfigure outs in Ableton Live 😅

Another thing you can check is if it's not the terminal output that is slowing everything down. Try commenting out the print in aiotone of all messages and see if that helps.

If all that fails, check in top what the CPU is spending time on.

@thisfred
Copy link
Author

Thanks for the tips, I will try! (Feel free to close this issue btw, as it wasn't really a bug report to begin with.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants