lpminimk3
lpminimk3 copied to clipboard
lpminimk3 not working in raspberry pi
I'm trying to use the Launchpad Mini MK3 on a Raspberry Pi 4 and struggle getting it to work.
Installed lpminimk3 using
$ pip install lpminimk3
Running the example gives me the following error:
$ python3 -m lpminimk3.examples.hello
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/home/pi/.local/lib/python3.9/site-packages/lpminimk3/__init__.py", line 81, in <module>
from .device import LaunchpadMiniMk3, find_launchpads # noqa
File "/home/pi/.local/lib/python3.9/site-packages/lpminimk3/device.py", line 3, in <module>
from rtmidi import MidiOut, MidiIn
File "/home/pi/.local/lib/python3.9/site-packages/rtmidi/__init__.py", line 4, in <module>
from ._rtmidi import * # noqa
ImportError: libjack.so.0: cannot open shared object file: No such file or directory
After installing the libjack-dev dependency it seems to require a JACK server
$ python3 -m lpminimk3.examples.hello
Traceback (most recent call last):
File "_rtmidi.pyx", line 1023, in _rtmidi.MidiOut.__cinit__
RuntimeError: MidiOutJack::initialize: JACK server not running?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pi/.local/lib/python3.9/site-packages/lpminimk3/examples/hello.py", line 21, in <module>
main()
File "/home/pi/.local/lib/python3.9/site-packages/lpminimk3/examples/hello.py", line 12, in main
lp = find_launchpads()[0] # Get the first available launchpad
File "/home/pi/.local/lib/python3.9/site-packages/lpminimk3/device.py", line 314, in find_launchpads
midi_out = MidiOut()
File "_rtmidi.pyx", line 1025, in _rtmidi.MidiOut.__cinit__
_rtmidi.SystemError: MidiOutJack::initialize: JACK server not running?
After installing jackd and running it using
$ jackd -d alsa
Results in not finding the lp mini:
$ python3 -m lpminimk3.examples.hello
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pi/.local/lib/python3.9/site-packages/lpminimk3/examples/hello.py", line 21, in <module>
main()
File "/home/pi/.local/lib/python3.9/site-packages/lpminimk3/examples/hello.py", line 12, in main
lp = find_launchpads()[0] # Get the first available launchpad
IndexError: list index out of range