I’m running Python on an Android tablet using Pydroid (https://play.google.com/store/apps/details?id=ru.iiec.pydroid3&hl=en_CA&gl=US). Has anyone tried installing SCAMP on a Android device, either using Pydroid or some other Python IDE?
Great question; I’m not sure if it will work though. You’d need fluidsynth to get sound from it, and I don’t know if that works on Android.
Well, it was partially successful. I was able to install scamp, scamp-extensions, and pynput, but not python-rtmidi or abjad. However, I’m not sure what to do about fluidsynth. I found an Android app named “fluidsynth” and installed it, but I don’t think it’s the same thing. I did find a Python package called “fluidsynth” and installed it as well.
When I tried to run ‘scamp-test.py’ (after setting “show_lilypond” to False, of course), I got this error:
Testing for working audio driver...
Traceback (most recent call last):
... (lines omitted)
AttributeError: module 'fluidsynth' has no attribute 'Synth'
So I’m not really sure if it’s something I’ve done wrong (or haven’t done), or it just doesn’t work. I don’t really care about python-rtmidi or abjad (not on my tablet, anyway), but without fluidsynth, I can’t listen to anything, so it’s not that useful.
Well you’d need the actually C fluidsynth library. Maybe you can install this and see what happens?
I have my doubts, but it’s worth a shot
According to their web site, it’s possible, but probably beyond my capability. I’ve done some programming in C/C++ and Python, but I’m by no means an expert. Seems it’s not a simple task:
I think the error I’m getting has nothing to do with FluidSynth itself. I opened the interpreter in Pydroid and just typed in the following line:
from scamp import *
Immediately I got the same error message. Is there some way to display the SCAMP version no.? I’m thinking that maybe I installed an older version of SCAMP, maybe what they have in the Pydroid repository is out-of-date.
Here is the complete console log:
Python 3.9.7 (default, Oct 6 2021, 01:34:26)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scamp import *
Testing for working audio driver...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/scamp/__init__.py", line 26, in <module>
from .session import Session
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/scamp/session.py", line 22, in <module>
from .transcriber import Transcriber
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/scamp/transcriber.py", line 20, in <module>
from .performance import Performance
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/scamp/performance.py", line 28, in <module>
from .note_properties import NoteProperties
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/scamp/note_properties.py", line 27, in <module>
from .text import StaffText
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/scamp/text.py", line 21, in <module>
from ._dependencies import abjad
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/scamp/_dependencies.py", line 58, in <module>
test_synth = fluidsynth.Synth()
AttributeError: module 'fluidsynth' has no attribute 'Synth'
>>>