Jikstra / serial2midi

Convert a USB Serial device to a Midi device
5 stars 2 forks source link

Missing dependency #1

Open radionerd opened 3 years ago

radionerd commented 3 years ago

sudo apt-get install libasound2-dev

Thanks for sharing such a brilliant and simple idea that everyone else missed.

Jikstra commented 3 years ago

Happy that it helps you :) Probably that lib is needed for the AUR package too. If you want to add a Debian/Ubuntu section to the README, i would appreciate a PR.

radionerd commented 3 years ago

Hi Jikstra,

I'll figure out how to do a PR and make it so once I have your code up and running.

I have a Yamaha PSR-520 keyboard that I'm hoping to connect with a laptop running Ubuntu 21.04 via a USB serial dongle+interface and your serial2midi driver. The AliExpress midi lead I bought only functions sometimes from the keyboard to the PC, I suspect due to the baud rate being slightly off as there is no visible crystal on the PCB. So, I would like to try your approach while I wait for a Roland UM-One midi lead to arrive. We're in Covid lockdown in New Zealand at the moment, it could be a while coming.

I've hit a bit of a road block running your code going the route: git clone https://github.com/jikstra/serial2midi.git ; pip install -r dependencies.txt I get a runtime error as follows: @.***:~/Projects/serial2midi$ python3 main.py /dev/ttyUSB0 Traceback (most recent call last): File "/home/richard/Projects/serial2midi/main.py", line 175, in main() File "/home/richard/Projects/serial2midi/main.py", line 172, in main serial_to_midi.run() File "/home/richard/Projects/serial2midi/main.py", line 70, in run virtualMidiInput = rtmidi.MidiIn() AttributeError: module 'rtmidi' has no attribute 'MidiIn'

I get the same error whether running Ubuntu 21.04 on RaspberryPi4 or my Intel laptop. There seem to be at least three rtmidi libraries for python. I thought I would check with you before diving in too deep. Thanks in advance for any suggestions that you may have regarding where to look to solve the problem.

Regards

Richard Jones

On Thu, Aug 19, 2021 at 2:34 PM Jikstra @.***> wrote:

Happy that it helps you :) Probably that lib is needed for the AUR package too. If you want to add a Debian/Ubuntu section to the README, i would appreciate a PR.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Jikstra/serial2midi/issues/1#issuecomment-901562299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYL5SDJWKU6JWP3GTI3D6TT5RUTBANCNFSM5CNBCJUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Jikstra commented 3 years ago

@radionerd oh yes, it was old/wrong dependencies. Somehow the python ecosystem is quite confusing, a lot of very similiar named libraries, that even have the same name when imported, but have different apis. It's annoying. I updated dependencies.txt, have a look if that works for you now. Maybe first run pip uninstall serial && pip uninstall rtmidi and then after a pull, again the pip install -r dependencies.txt. The correct names of the needed modules is pyserial and python-rtmidi.