You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Trying to connect my MIDI keyboard to my Android device here and I run into some problems.
TLDR:
pygame.midi.init() launches ImportError: No module named pypm on Android 4.4.4, Kivy 1.8, buildozer 0.27dev
Index
Information
traceback
source code to reproduce the error
grep for pypm on android-for-python
PLATFORM INFORMATION
Kivy 1.8
Buildozer 0.27dev
Python-For-Android (version downloaded by buildozer)
APK Compiled in Ubuntu 14.04 LTS, Linux 3.13.0-46-generic Build with lxml not working #79-Ubuntu SMP x86_64 GNU/Linux (note it works correclty under ubuntu so it's not the ubuntu pygame version)
TRACEBACK
When starting a program and launching pygame.midi.init() on android I get:
I/python (13347): Traceback (most recent call last):
I/python (13347): File "/myprojectdir/.buildozer/android/app/main.py", line 48, in <module>
I/python (13347): File "/myprojectdir/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/app.py", line 766, in run
I/python (13347): File "/myprojectdir/.buildozer/android/app/main.py", line 41, in build
I/python (13347): File "/myprojectdir/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/site-packages/pygame/midi.py", line 71, in init
I/python (13347): ImportError: No module named pypm
I/python (13347): Python for android ended.
I/AndroidRuntime(13347): VM exiting with result code 0, cleanup skipped.
It seems pygame pypm module is not included in Py4A default build. What you can do is enable it by hand during your setup. Please refer to: python-for-android/recipes/pygame/Setup
More than that, pygame is going to be removed soon on Android (at least deprecated), as we are all moving to SDL2. Pygame on android is half-used, mixed with a custom SDL 1.3 (never released version). It's already cleaned and working on iOS.
Midi has never been a target for Kivy, but i guess you might try to look (or give a recipe) to compile another midi library then :)
Hi, Trying to connect my MIDI keyboard to my Android device here and I run into some problems.
TLDR:
pygame.midi.init() launches ImportError: No module named pypm on Android 4.4.4, Kivy 1.8, buildozer 0.27dev
Index
PLATFORM INFORMATION
TRACEBACK
When starting a program and launching pygame.midi.init() on android I get:
Reproducing the problem
midi.kv file:
main.py file:
GREP
Checking the source code, the results of grepping$(SDL) $ (PORTMIDI) $(PORTTIME) $ (DEBUG)
$ grep -iR pypm *
Binary file android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.pyo matches
Binary file android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.pyc matches
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py:_pypm = None
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: global _init, _pypm
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: import pygame.pypm
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: _pypm = pygame.pypm
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: _pypm.Initialize()
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: global _init, _pypm
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: _pypm.Terminate()
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: del _pypm
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: #del pygame._pypm
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: return _pypm.CountDevices()
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: return _pypm.GetDefaultInputDeviceID()
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: return _pypm.GetDefaultOutputDeviceID()
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: return _pypm.GetDeviceInfo(an_id)
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: self._input = _pypm.Input(device_id, buffer_size)
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: if r == _pypm.TRUE:
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: elif r == _pypm.FALSE:
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: self._output = _pypm.Output(device_id, latency)
android/platform/python-for-android/dist/miditest/python-install/lib/python2.7/site-packages/pygame/midi.py: return _pypm.Time()
Binary file android/platform/python-for-android/dist/miditest/private/lib/python2.7/site-packages/pygame/midi.pyo matches
Binary file android/platform/python-for-android/.git/objects/pack/pack-5e24aee07aeb8a388e2646faae0bee9d8034838e.pack matches
android/platform/python-for-android/recipes/pygame/Setup:# pypm src/pypm.c
The text was updated successfully, but these errors were encountered: