Wrong characters when typing in GNU/Linux ARM

• Jan 30, 2016 - 20:12
Type
Functional
Severity
S3 - Major
Status
closed
Project

Hi, in my MuseScore 2.0.2. on my Android tablet when I try to type using any kind of virtual keyboard, I get wrong characters from the keyboard ("b" instead of "s", "Backspace" instead of "5"), looks like some encoding is not right. The problem appears on a New Score wizard or directly in a score. The same problem remains when I connect a hardware keyboard to my tablet through OTG. Can you please advise what to do? Thank you

Computer: Android tablet with ARMv7 (Prestigio MultiPad 7.0 HD Duo) using chroot and Ubuntu with wily suite, Musescore 2.0.2, rev. f51dc11


Comments

When I tried typing with the same keyboards in different programs (like Tuxguitar), the keyboards type correctly, the problem with wrong characters is only in MuseScore.

As a short-term workaround you could try setting your system/keyboard language to English (US) or English (International) if it's currently set to something else. Obviously, you shouldn't have to do that in the long term and if other apps are working fine then this is something that needs fixing in MuseScore (or perhaps in Qt which MuseScore relies on for platform independence).

Hi Peter (shoogle), I have tried that (to switch to English US, English International is not in my menu), but it is always the same. And it is not a question of a few characters, all of them are mixed up, the only one correct one is "a". Do you think I can update somehow this Qt? At present I cannot type anything in MuseScore (lyrics, new score, any text), I only remember a few keys and will perhaps make a special crazy keyboard according to what works in MuseScore, but here I will miss many characters. Also special keys from the VNC viewer (enabling GNU/Linux) don´t work in MuseScore, so the work is very limited. Many thanks

I am afraid that GNU/Linux version of MuseScore 2.0.2 (or Gt) interprets wrong the ASCII codes received from a keyboard. In other programs keyboards work normal on my tablet (Tuxguitar, MuseScore 1.3, Ubuntu wily suite generally). In order to achieve "x" in MuseScore 2.0.2, which is in ASCII normally "120", it needs number "112" (normally for "p") and then I can have "x" in MuseScore. I don´t know what kind of encoding was used in MuseScore. Now I have made special keyboard which works only in MuseScore, but many characters are missing, because I simply don't know which code is required to achieve a particular character. I did a special keyboard like this that I pressed all keys in a hardware (or any other) keyboard and wrote down what it did in MuseScore. Then I changed the codes in the standard ASCII virtual keyboard (e.g. for "x" not "120", but "112", because when I press "p" in my keyboard ("112"), it makes "x", so I need "112" for "x" and not standard "120"). Maybe wrong UTF-8 or different encoding than UTF-8 encoding in GNU/Linux MuseScore 2.0.2 or Gt? Thank you for any help

none of those programs use Qt5 I believe (MuseScore 1.3 uses Qt4). Maybe test some simple program that uses Qt5 with keyboard output? A quick google search reveals to me https://github.com/selairi/mdiedit which is a text editor for Qt5, but you would have to clone that repo and compile yourself to test, which might be too much trouble for you...

Does anyone know of a simple Qt5 keyboard test program?

I compilied that mdiedit program for Qt on my C201 ChromeBook (which also uses ARMv7-A) running Arch Linux and uploaded that binary to my personal share https://efjz.in/index.php/s/wXAlK2qxRBJJCfN

If you could try running that program and let me know if you can type characters in, then that would tell me if the problem is indeed with MuseScore or with Qt5. Also go to "Help"->"About Qt" and tell me what version of Qt is says (on mine it says "This program uses Qt version 5.5.1").

EDIT: I just realized my binary might not work on your chroot since arch uses the latest Qt version, while Ubuntu is likely to be behind.

Hi guys, thank you for your attention. It says: Qt version 5.4.2

Just a small observation: now when I made a special keyboard with which I can type at least all small characters in GNU/Linux MuseScore 2.0.2, I have noticed that the codes needed for appearance of these small characters, are in this special keyboard kind of "too ideal", as if they were assigned automatically: e.g. in the first row of the keyboard they go like (fictitious example): 101, 102, 103, 104, 104, 105... Whereas in a standard ASCII keyboard the codes don't go so ideally, they would go like (fictitious example): 101, 102, 104, 105, 108. Maybe some error in a code of MuseScore 2.0.2 or incompatible Qt and then the system would give "some (ideal) numbering (codes)"? Not sure, it this observation is of any help :-)

I tried what Eric suggested - I mean to install mdiedit, but I could not install it, sorry. I double-clicked it, it asked me which application I want to install with, I chose LXterminal (sorry, I did not know what else) and it did not do anything. Is there something else I should use for installing? So far I used only LXTerminal for installing within Ubuntu wily suite in my tablet (but that was through connecting to Ubuntu servers, not installing what was in my tablet). Is there some other program with Qt5 that I can install directly through LXTerminal? I googled, but did not find anything, sorry

that binary is not something that needs to be installed. Just put it somewhere you can reach from your chroot terminal, cd to the directory, execute:

chmod +x mdiedit_qt551
./mdiedit_qt551

There is also a mdiedit_qt4 version which I compiled for qt4, which would be nice to also test.

BTY, please try what lasconic says above by going to musescore and checking "Help"->"About Qt" and letting us know what version of Qt it says.

I have already wrote the version + a few more lines in the comment #10, please have a look, thank you.

I have also tried what Eric suggested, but the last messages in the LXTerminal were:

android@localhost:/mnt/sdcard0$ chmod +x mdiedit_qt551
chmod: changing permissions of 'mdiedit_qt551': Operation not permitted
or
chmod: changing permissions of 'mdiedit_qt4': Operation not permitted

Any idea? Thanks

try: chmod 777 mdiedit_qt551
or maybe prepend with sudo?

I apologise for skipping over your comment earlier. And sorry if this is being too complicated for you.

(BTW, for anyone else listening, I compiled that binary for QT5 in the makefile. I'm not sure if that binary will be compatibile with a machine runnign qt 5.4.2, although I could try downgrading my Qt and recompiling to test)

Actually this sdcard0 (see comment #13) is my internal storage on my Android tablet, it is not an external card. Here I can store applications (apk) which I can install later from here in Android. But when I am in Chroot, it looks indeed I cannot install from here.

Besides Android sdcard0 I can also reach Android System from Chroot. But I cannot copy into Android System, it doesn't allow me.

I copied Qt5 file to the Chroot Desktop or a folder (at least I think), but the commands for installing (chmod +x mdiedit_qt551 or chmod 777 mdiedit_qt551) did not work.

Any idea what else to do? Thank you

as a matter of technically, don't use the word "install" when all we are trying to do is just executing a binary. The chmod lines are supposed to make the binary executable (which are normally set non-executable when downloaded for safety). Now I'm thinking you might not have busy-box, which provides the chmod command.

Ok, execute :-). Actually, when I am in a folder of GNU/Linux and I double-click the file Qt551, it says: This file 'mdiedit_qt551' is executable. Do you want to execute it? The options are: Execute/ Execute in Terminal/ Cancel. When I choose Execute, nothing happens. When choose Execute in Terminal, the Terminal opens and closes immediately.

I have busy-box v1.24.1-meefik

Any idea? Thank you

When the Terminal shortly opens and closes quickly in executing the file 'mdiedit_qt551' (see comment #18), could it mean that the file was executed (I mean the process is successful and the file is in the system "installed")? Thanks

It is absolutely the same as with Qt551

When the Terminal shortly opens and closes immediately (see comment #18 and 19), it doesn't leave any message, nothing is visible in the Terminal, so it looks like nothing was happening, nothing was done.

But, maybe a little was done in my tablet, I just noticed that in the Start menu there is a new item: Other, and it has inside one item - just a round icon. When I click on the round icon, it shows Error: Text was emply (or contained only whitespace)

ok. I'm afraid I'm making you do a wild goose chase, simply to test how Qt interprets your key presses. I was hoping that binary I compiled would work on your machine but clearly there are incompatibilities...probably due to different libaries. You could try compiling that test program yourself, but that is usually very involved and might not be worth your effort. Maybe someone else on this forum has a better way to nail down your keyboard issue? All I can suggest at this point is to try installing some other Qt programs that are already packaged for your Ubuntu from this list: https://en.wikipedia.org/wiki/Category:Software_that_uses_Qt and see if any exhibit the keyboard problem (and also report the version of Qt). That will tell us if MuseScore is at issue or if it is Qt or the chroot.

I just realized there is the kate text editor which uses Qt. Can you install kate by typing:

sudo apt-get install kate

and then run it by typing

kate

and then trying to input with keyboard, and also go to "Help"->"About Kate"->"Version" and reporting what number it says for Qt.

Nevermind...that is going to install way too many dependencies.

I finally found a simple Qt text editor for ubuntu that won't require too many dependencies called "juffed" that you might be able to install with:

sudo apt-get install juffed

and let me know if you can type anything and the Qt version.

EDIT: I also found a newer Qt text editor "tea" you might be able to install with

sudo apt-get install tea

Thanks a lot! I have installed Juffed, it uses Qt4.8.6 and the keyboard is no problem. I have installed Kate, but this cannot start after installation. I have installed Tea, this uses Qt 5.4.2 (which is the same as MuseScore uses) and BINGO, the keyboard has the same problems as in the MuseScore. So the problem is not MuseScore, but Qt 5.4.2. What should I do now? Contact some Qt guys? Thank you

If were to report to Qt, I'm sure they would want you to try with the latest Qt release installed, because this might be an issue that they already know and have fixed since Qt 5.4.2. I think having you compile the latest Qt dev from source would be out of the question because would take forever. Does anyone know of an easy way to install latest Qt dev builds inside DusanP's Ubuntu chroot on android?

Arch linux always has latest Qt libraries (5.5.1) as compiled binary, so if you're feeling adventurous you can try installing an archlinuxarm chroot, and seeing if musescore works with keyboard...but I must warn you arch linux is not for faint-of-heart.

Ideally you would try installing Qt 5.5 and see if that fixed the problem, but it doesn't look like that's possible because there is no Qt 5.5 package for Ubuntu Wily (15.10) and you can't get it directly from the Qt website because they don't release ARM packages.

Unfortunately it looks like there's no option but to wait for the time being. When Ubuntu Xenial (16.04) arrives it will have Qt 5.5 in it's default repository, so you can try upgrading then. But remember, that's just something to try; we don't actually know whether the bug is fixed in Qt 5.5.

Ubuntu Xenial is already out, I have installed it, but when I start the chroot within Linux Deploy, it always says at the end in Starting Services that that VNC [5900] ... fail and I cannot start the chroot, maybe I should find out why the VNC always fails and then see it Qt 5.5 works fine here. Or to try installing Arch Linux.

Since Qt website doesn't release ARM packages for Wily, I should contact Ubuntu, because they release the ARM packages, right? Or who else releases the ARM package with Qt for Wily? Thank you

Ubuntu Xenial (a.k.a Ubuntu 16.04) won't be released until April. April is the 4th month - that's what the "04" stands for. (Ubuntu versions ending in ".10" are always released in October - i.e. the 10th month.) If you have Ubuntu Xenial installed it must be an alpha (developmental) release. It's possible that the VNC problems will be fixed in the actual release.

Qt is a common dependency, so you can be reasonably sure that the latest version will be packaged for ARM in time for the official release of Xenial, and I don't think that it would happen any sooner if you contacted them.

Your setup is extremely rare (Ubuntu via chroot via Android running on ARM) so there is a high likelihood of something not working properly. It may indeed be best to try a distribution with more up-to-date packages, like Arch.

Thanks for explaining, I have started installing Arch Linux. I used Linux Deploy, but no luck, packages were retrieved, but not installed. Can you please recommend the most efficient way of installing? Can it happen that my tablet architecture is not suitable for Arch Linux? So far Linux Deploy was good in installing. When I installed Ubuntu in the Linux Deploy, I used the architecture armhf, but when I tried installing Arch Linux, it did not offer me armhf. The closest was armv7h, but installation did not happen. It seems that my exact processor type is armv7l. Thank you

>> packages were retrieved, but not installed

could you elaborate. Are you saying that you tried downloading Linux Deploy's minimal arch linux base image but that that download failed. Or are you saying that you were able to get a minimal arch linux runninig, but that pacman failed to fetch any packages?

>> Can it happen that my tablet architecture is not suitable for Arch Linux?...Ubuntu in the Linux Deploy, I used the architecture armhf. The closest was armv7h, but installation did not happen.

Well I believe armhf in debian speak is ARMv7 with hard float ABI, and armv7h in arch linux arm speak is ARMv7 with hard float ABI, so those should be the same ISAs, and so your tablet architecture should be suitable for arch linux.

You said your computer is "Android tablet with ARMv7 (Prestigio MultiPad 7.0 HD Duo)". For reference purposes, could you let me know what version # of android and if you are running a custom or stock rom.

My Android version is 4.1.1, I have the factory firmware with a factory update, so no custom or stock rom I suppose. The current version of the factory firmware is PMP3970B_20141205_v1.0.15. When I install Busy Box, it shows that my processor is armv7l

>> packages were retrieved, but not installed
I have used Linux Deploy (LD) for installing Arch Linux. Within LD I chose Distribution: Arch Linux, then Distribution suite: latest, I chose Architecture: armv7h and then pressed Install. LD starts to Retrieve Base Packages (file system...done, acl...done, archlinux-keyring...done and so on) and it takes several minutes. Then LD is supposed to install these packages, but when it comes to it (Installing Base Packages), no installation happens, the monitor just shows >>>install and the installation finishes. Then when I try to start Services (VNC), it cannot start and I cannot launch Arch Linux. This happened with all possible architectures (also armv6, arm)

I try now Complete Linux Installer application, yesterday I could not launch Arch Linux, it said the "img. file is corrupted", I try now to download the image again.

Any idea how to process? Thank you

hmm...I don't know why packages not installed. The cpu microarchiture is Cortex A9, which implements ARMv7 ISA and has floating point (the "h" stands for hardware floating point) and I believe the "l" is for little endian, which the cpu should understand if told.

I might have a look into it myself on one of my own androids...my cellphone is Samsung S3 i9300 which has an Cortex A9, although I'm on latest android v 6.0.1, kernel 3.0.101-CM-g6b99703 on Cyanogenmod 13, but I should be able to replicate your steps installing Ubuntu 12.04 with this Linux Deploy program (I'm going to use release version 1.5.5 )...

I'm making a note that my busybox says my architecture is "armv7l" ("l" for "little-endian memory word layout"), although I'm downloading the "armv7hf" ("hf" for "hardware-floating point application binary interface") ubuntu wily. (Note that hardware float vs software float and little-endian vs big-endian are two separate issues...I wish everyone would use the same standard naming scheme. Regardless, I'm pretty sure you and I are on the same architecture.

When I install Ubuntu with Linux Deploy, it works, the problem is only with Arch Linux, though

Now I try to use The Complete Linux Installer. Today no problems with image corrupted as yestarday, but I got stuck in:
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Invalid argument
Error: Unable to mount the loop device!

a lot of these problems installing chroots with Linux Deploy are best helped by asking at https://github.com/meefik/linuxdeploy/issues because I wouldn't know. I'm trying to install chroot myself with Linux Deploy now, but having issues.

(FYI, I've installed a choot in ~5years ago when I first got an android, and I remember executing the MuseScore 1.3 in a debian lxde chroot via VNC on a Galaxy Note II maybe 2 or 3 years ago, although I remember it being practically unusable. I do want it to work, so I'm willing to look into any bugs for which we can determine MuseScore is at fault.)

regarding Linux Deploy arch linux, I'm running into your same issue where it retrievies packages list, but then has a filesystem ... fail when retrieving base packages, and then closes with <<< install...

Well, I found that there was some error with my external SD card, it did not write down correctly, so this was probably the problem why it did not install Arch Linux. Now I replaced the card, Arch Linux in Linux Deploy has progressed much further, now downloading files, now installing, all fingers crossed to help finish it! :-)

Arch Linux is installed, please what is the command for installing MuseScore? Later I will read about commands, but now I am anxious to see if Musescore works. Lafer I will also write all steps for the installation. Thank you

According to the Downloads page the command you need to run to install MuseScore on Arch Linux is:

pacman -S musescore

But I don't see any ARM packages listed here, so if that doesn't work then @ericfontainejazz can tell you where he got his copy.

Thank you, it tells me: error, you cannot perform this operation unless you are root. But my tablet is rooted and I checked it and it was.. Any idea? Thanks

I had to modify the command to 'sudo packman -S musescore', now it does something, but indeed it did not finish the installatiin, there were errors at the end. I will ask Eric, thank you

This is the configuration I used when installing Arch Linux on my Android tablet, I can say more details if needed:

Distribution: Arch Linux, Suite: latest, Architecture: armv7h
Checked custom mounts
Busy Box by meefik, bVNCfree viewer

Eric, can you please tell me where I can find MuseScore 2.0.2 for Arch Linux? Thank you

MuseScore 2.0.2 installed in Arch Linux successfully and the problem with wrong characters disappeared, thank God. Now I would like to use the corrected version of MuseScore 2.0.2 reg. the enormously long stems. Can you please Eric advise, how I can use the corrected version? Many thanks

Status (old) active closed

I have built a debug build on recent git master with some small modification I had made...you can download here, and should be able to execute (might have to chmod +x):

https://efjz.in/index.php/s/s2HODcBEXtxZ4or

I'm marking this as closed, based on the conclusion that the bug was something in an earlier version of Qt that has been fixed by Qt already. So that means people using debian or ubuntu will have to wait (or use Qt testing builds) if they experience this issue.

Status (old) closed active

Please could you check which version of Qt is installed so that we be sure that's what fixed it for you?

I'm impressed with your determination to have come so far without giving up! Unfortunately, if the long stem bug hasn't been fixed in the Arch package then there is no way for you to get hold of it, except by compiling yourself, until whoever compiles the Arch packages gets around to fixing it.

Your choices are:

  1. Compile MuseScore yourself.
  2. Contact the Arch maintainer to have the stem fix applied.
  3. Wait for the Qt 5.5 packages to be released for Ubuntu Xenial so that I can backport them for Wily.

The quickest option would be to compile yourself by installing the source code package that corresponds to the 2.0.2 binary package you just installed, applying the fix, and recompiling. However, if you've no experience doing this then it can be quite tricky.

If any Arch developers are reading this then the fix appears to be as simple as adding this patch to the list of patches in this file. Unfortunately, I don't have an ARM system on which to test the build so I can't do it myself.

Thanks for the compliment:-) I thank you for your great and valuable work! The Qt version used in the Arch Linux MuseScore 2.0.2 is 5.5.1 and here there is not problem with the keyboard.

Thank you very much for the debug build. Unfortunately I have not managed to execute it yet. It tells me: error while loading shared libraries: libvorbisfile.so.3: cannot open shared object file: No such file or directory.

I used LXTerminal where I directed to the Desktop folder within the Arch Linux chroot and then used:
./mscore-debug-build-607ac24

So far I have not installed MuseScore 2.0.2 from the Arch Linux ARM packages. Should I do it before I start to execute the debug-build version?

Any idea? Thank you

Files on Linux that are named like lib*.so* are shared libraries (pre-compiled bits of code that perform common tasks and are shared between different programs so that each program doesn't need to rewrite the relevant code). It looks like libvorbisfile.so.3 is missing on your system, but you can see if you have any version available using:

ldconfig -p | grep libvorbisfile.so

If not, or if you have a version which is too old, you will need to install it. I don't have Arch, but presumably the command would be:

sudo pacman -Syyu
sudo pacman -S libvorbis

Maybe @ericfontainjazz can confirm this?

Thank you. I have downloaded "libvorbis-1.3.5-1. Then I had to download for the same reasons also "libsndfile-1.0.26-1. The last error was: error while loading shared libraries: libQt5Designer.so.5: cannot open shared object file: No such file or directory.

I tried to download "libQt5Designer" or "libQt5Designer.so.5", but it tells me in both cases: error: target not found
------------------
2 hours later:
Well, I have finally the debug-build running in my tablet. It is not probably the proper way it runs (as it seems to me), but it works. The procedure was following: I installed MuseScore version 2.0.2 from the Arch Linux ARM packages. Then I executed the debug-build, which is MuseScore 2.1.0, and it simply opened the application (no installation). Then I uninstalled MuseScore 2.0.2 (only soft removal with -R, the dependencies, at least I think, remained). Then in the Properties of a MuseScore file I made the default application for opening this debug-build. And it opens after double-click on a MuseScore file with the debug-build of MuseScore 2.1.0.

MuseScore 2.1.0 is not listed in the Start Menu (under Sound & Video), but I know that I have in my tablet :-)).

Is this the right way to use the debug-build? Or is there a way I can properly install it so that it is listed in the Start Menu? I mean it is not a big deal to use it as it is, but still, just a question :-) Thank you

Ah, I think you edited your previous comment while I was typing mine. If you haven't installed MuseScore from the Arch repo yet then you will need to do so because that will also install all of its dependencies (i.e. the libraries it needs). When you try running the program, make sure it is really @eric's file that you are running and not the Arch version.

@DusanP,

as a matter of technicality, MuseScore nightly builds are numbered "2.1.0", not "2.0.1" (which was released last May).

As you have figured out regarding installing libraries, what you figured out with "pacman -S musescore" then "pacman -R musescore" will do the trick. It will not be under the start menu, and I wouldn't bother trying to put it there. In fact it would be best to open a terminal and execute musescore from terminal since the debug build will print text there, which will be useful for the inevitable crash. Oh, and please report any crash or bugs with reproduction steps.

Actually, making it appear in the start menu isn't too hard. Simply create a text file in ~/.local/share/applications called "musescore.desktop" and paste in the following:

[Desktop Entry]
Name=MuseScore Debug Build
GenericName=Music notation
Comment=Create, play and print sheet music
Exec=/path/to/your/debug/build/mscore %F
Icon=musescore
Terminal=false
Type=Application

Change the "Exec" line to point to the debug build (keep the "%F" at the end of the line) and then make the file executable (chmod u+x musescore.desktop). Note that the ".local" directory begins with a dot "." and will therefore be hidden on Linux.

That will put it in the start menu (you might need to reboot to see it) but if you want to give it an icon then just pick one of these SVGs and save it as "musescore.svg" in ~/.local/share/icons/hicolor/scalable/apps. If the icon doesn't show in the start menu after a reboot do:

gtk-update-icon-cache -tf ~/.local/share/icons/hicolor/

Actually, making it appear in the start menu isn't too hard. Simply create a text file in ~/.local/share/applications called "musescore.desktop" and paste in the following:

[Desktop Entry]
Name=MuseScore Debug Build
GenericName=Music notation
Comment=Create, play and print sheet music
Exec=/path/to/your/debug/build/mscore %F
Icon=musescore
Terminal=false
Type=Application

Change the "Exec" line to point to the debug build (keep the "%F" at the end of the line) and then make the file executable (chmod u+x musescore.desktop).

Notes:
1. The ".local" directory begins with a dot "." and will therefore be hidden on Linux.
2. The Exec line must contain a full path without aliases. (E.g. "/home/dusan/bin/mscore" and not "~/bin/mscore" or "$HOME/bin/mscore")

That will put it in the start menu (you might need to reboot to see it) but if you want to give it an icon then just pick one of these SVGs and save it as "musescore.svg" in ~/.local/share/icons/hicolor/scalable/apps. If the icon doesn't show in the start menu after a reboot do:

gtk-update-icon-cache -tf ~/.local/share/icons/hicolor/

If you experience any problems with MuseScore then run it from the Terminal to see the debug information, like @eric said.

Thank you guys for all your help, I have edited my previous comment and corrected the version of MuseScore to the right number 2.1.0 (sorry!:-)). Maybe I will also try putting the program in the Start Menu, thanks for the instructions. I will definitively report any bugs or crashes if they appear during using the program.

Are there any plans of having editable version of the MuseScore directly for Android?

And is there any chance to hear the program play in the Arch Linux chroot?

Many thanks

regarding chroot audio, are you able to hear sound when you run any other audio programs in the chroot? Might be a limitation of the chroot (are you going through a vnc?). Here (https://github.com/meefik/linuxdeploy/issues/56) meefik said some devices work out of the box with audio, and someone else there had to use KDE to get audio. (KDE uses pulse-audio, while LXDE is just alsa by default, so maybe need to use pulse-audio). But I would bet audio would be choppy at best.

You should be able to hear it now. If not, try these steps, checking for audio after each step:
1. Try launching the debug build from the command line with the "-F" option to do a factory reset.
2. Try all four sound servers listed in MuseScore > Edit > Preferences > I/O.
3. Try installing either "pulseaudio" or "alsa" using pacman and then repeating step 2.

Eric and I are not on the core team so we don't have a say about Android. However, as someone who follows the project closely (and who has developed Android applications in the past) I would say that this is extremely unlikely in the near to mid-term, but may happen a few years down the line. It is a commonly requested feature, but the difficulties of programming for Android, combined with the need to completely redesign the user interface for touch-based input make it impractical for the time being.

I'm thinking about how audio from musescore inside the chroot might be delayed and choppy, due to the overhead of sending the output wav through the vnc, loopback network interface, then through android system. One simple solution is to lower the bitrate and samplerate, so less data needs to be processed.

I wanted to make a note about an idea to have musescore send raw MIDI messages through the loopback network interface, to be synthesized by an Android app and directly outputted via Android's audio output API. The android app could also be used as a bridge to the phone's USB port, allowing an external keyboard as input, or to send the midi to an external hardware synth (some keyboards have synth built in - which would alleviate much of the processing load). I know pulseaudio can send wav over the network (I've even been able to install a pulseaudio sink on my wifirouter), but I don't know if pulse audio is designed to send midi-messages over network (which would require a pulse audio listener implemented on android), and I haven't looked into whether jack or portaudio has such a thing (I see alsa has aseqnet but I don't see any android implementations). A google search also reveals open midi network protocol like RTP-MIDI or QmidiNet for linux, but I suppose would have to add code to musescore and implement an android listener. The Android API actually has https://source.android.com/devices/audio/midi.html but I don't think that will communicate over network.

That also leads me to consider the following method to unofficially distribute the full musescore editor to android: create a minimal linux image to be installed by LinuxDeploy (or another chroot installer like it) which contains the minimal set of dependencies required to run musescore (wouldn't even need a desktop environment like lxde...just need startx), along with an android midi-synth...could possibly even fork LinuxDeploy and add capabilities to synthesize the midi it receives from the chroot, so is self-contained. Of course would require root.

I might start a second post on that once I evaluate the difficulty, as this thread is closed. But I'm curious to know how well musescore works on your tablet chroot.

Thank you for the tips on audio, I think I will stay for the time being without audio, only with the score and notes - this is actually the main reason why I need MuseScore in my tablet. If I am uncertain about some melodies, I can use a midi keyboard from Android.

If I manage the MuseScore play in the chroot, I will definitively write it here. I will also report possible bugs or crashes while using MuseScore.

If there will be any kind of MuseScore editor for Android (as Eric mentioned), please let me know, I will be happy to try it.

Many thanks for your co-operation!

You're welcome!

Having re-read your previous post I'm not sure whether you meant that it's just MuseScore that doesn't make sound in the chroot, or whether none of your programs have sound. If none of them do then we probably can't help you, but if it's just MuseScore the solution is probably as simple as one of the one's I posted above. E.g.:

/path/to/mscore -F

Alternatively, try exporting your score in a audio format such as MIDI, MP3, WAV or OGG and listening in a normal audio player.

If you want to listen from within Android itself you could download the MuseScore app (playback only) or export as an audio file. You could also upload to MuseScore.com and listen there.

It is actually the complete chroot that doesn't make any sound. People on the web sugest installing KDE enviroment instead of LXDE, but I tried it today using the Linux Deploy, but Arch Linux started strangely - just a black screen, which doesn't look very right. Well, I will do a few more steps to make the chroot play and soon I will forge it for a lower importance :-)

Just a note reg. the possible future Android version of MuseScore. Did you also consider the touch mode marked as 'touchpad' for this version? It is a compromise between complete touch and a cursor mouse and like this it might be easier perhaps to adjust the design of MuseScore for Android. I use 'touchpad' in my Android chroot for the normal, not adjusted MuseScore, and even like this it is fine - I don't use a mouse or hardware keyboard, just a cursor (exact directing) and touch.

>> "People on the web sugest installing KDE enviroment instead of LXDE"

As I said in #60, maybe need to use pulse-audio. I don't think you need to install a full KDE (which is much more resource-hungry). Just install pulse-audio from LXDE:

sudo pacman -S pulseaudio

and may a pulse audio volume controller:

sudo pacman -S pavucontrol

and then in musescore I/O audio preferences select pulse audio. But that is just a hunch.

Regarding touch input, I know that Qt has a touch input capabilities, but I don't think implementing that is high priority for musescore. My recommendation is to get a bluetooth keyboard an mouse (which should be supported by LinuxDeploy) and use musescore just like on a desktop.

One last thing I was going to mention about audio...I find that on slow devices like raspberry pi, the cpu synth is really slow, so instead I output midi via usb to my yamaha clavinova and let the yamaha's hardware synthesize the midi. But trying to send usb midi out from inside the chroot is going to be way too complicated, so you are best just disabling audio if it is slow.

Unfortunately my tablet is too simple (it was a promotional gift) and I don´t have Bluetooth, only Wi-fi. Then I have OTG, micro SD slot and micro HDMI slot for monitor. So I cannot use keyboard and mouse while charging which is a problem, because the battery is gone quite quickly. So I learnt to use Touchpad mode and it´s usable (no hardware keyboard, no mouse).

I tried my best to connect keyboard and mouse and charge at the same time, but it all failed. Or do you know about keyboard and mouse that could be connected to my tablet through Wi-fi? I know only about an expensive HP mouse.

Or is there a way I can use Wi-fi as Bluetooth? I did not find anything like this so far.

Or do you know about a way how to connect mouse and keyboard and charge at the same time via OTG? So far all magic cables I tried were fake and never charged when there were peripherals connected to my tablet through OTG.

What seems to be possible is to create a Remote mouse and keyboard in my Android phone and use it then as a Remote mouse and keyboard in my Android tablet, but there must be always some network around, so if I go out, I would have to take a modem with me to make a network, I am afraid. And it is quite difficult to make such a connection between 2 Androids.

In the LXDE chroot I tried installing pulse-audio and also alsa, but no sound at all, not even from mp3. NOw I have installed Xfce enviro and mp3 works!! Now installing MuseScore, will see :-)

Many thanks

Sorry, I don't know much about non-blutooth wireless mouse/keyboard.

There are special OTG USB cables that can charge and have mouse/keyboard input, but you're on your own for that.

Regarding using your phone as input, I have had used the touchpad feature of KDE-connect https://f-droid.org/repository/browse/?fdfilter=kde&fdid=org.kde.kdecon… between my andoird and desktop.

Musescore can work to some degree without a mouse. esp if just doing single-staff chart. But I think there could be a few modifications to musescore, esp on things like the start page, to make it fully functional without a mouse.

I'm actually wondering now if someone has already made an android remote control for musescore. If not, this might be something useful. Would run on your smartphone and consist of an android virtual keyboard that is modified to have all the important keyboard shortcuts as buttons laid out just like the musescore window, with no need to press shift/ctrl, and contain a mouse touchpad, which talks over wifi to musescore. Oh and then maybe could act as the mythical remote midi synth I've been dreaming about to relieve some processing power from the weak device running musescore (again I don't know how feasable that is).

I haven't tried my chroot yet, sorry. I don't know the exact requirements for LinuxDeploy to work with audio. Did you make sure your mp3 program and musescore were configured to send audio through pulseaudio and do you see sound levels change in pavucontrol? Regarding gnome, if terminal doesn't work, then that is basically an indication that other things won't work...although you might try installing a simpler terminal like xterm or lxterminal.

I have audio (mp3) running on Arch Linux chroot, but I have not managed midi files running (and I think that making MuseScore play would be a bit like making a midi file run, right?). It says that Jack client cannot be created or Alsa cannot be attached. Pavucontrol only says: Wait, connecting to Pulseaudio, but nothing happens.

In LXDE enviroment I had to download a few packages and then mp3 started to run, not midi files. In the Gnome enviroment I didn´t have to download any packages and mp3 worked right away. I tempted to try midi files here, but the problem is here that the included Terminal doesn't work and I cannot download any midi player to try a midi file. Is there a way I can install other Terminal than the one included in the chroot suite? I tried Guake (just to double click this package), but could not execute it..

Thank you

regarding installing another terminal, at the end of my previous comment, I wrote: "Regarding gnome, if terminal doesn't work...you might try installing a simpler terminal like xterm or lxterminal".

Actually I saw it, but since the included Terminal doesn't work, how else can I install another terminal than through the non-working Terminal? I tried to double click some terminal package (Guake), but no installation happened...

After Ctrl Alt F2 a command line appeared. I entered: $ sudo pacman -S lxterminal, but it told me 'Command not found'. Did I make the command corretly? Thanks

Sudo might not be installed. Try:

su - root

And that should log you in as root user. Then you can install lxterminal as well as sudo:

pacman -S lxterminal sudo

Thank you, I managed to have a terminal in the Gnome environment, but no midi playing so far. Mp3 plays with no trouble (it is absolutely smooth), but no midi in my Arch Linux ARM chroot. Do you have any idea what can be done to play midi files in this chroot? I have searched a lot, but still no luck. I know that this is a question for Arch Linux, not for MuseScore, but I would love to hear MuseScore play in the chroot..

Do you think that when I cannot hear any midi files played that this is the problem of Linux Deploy or rather Arch Linux ARM?

Thank you

A good news, MuseScore is now working with Jack server, for the first time I saw the transport buttons active and for the first time Play Panel was possible to activate. Now the cursor moves in a score (transport). Still one more thing to achieve: there is no sound coming out.. Inside Arch Linux it says that Alsa sequencer cannot be found, do you have an idea what I can do? I start to believe the sound of MuseScore within the ARM chroot will be done.

have you verified that you see a soundfont listed if you go to View->Synthesizer? And when you press the play button, do you see the volume bar in the synthesizer move up and down when notes are played?

I have checked it and it shows FluidR3Mono_GM.sf3. When I press the Play button, it shows the peaks in the volume bar, but no sound is going out..

I have the impression that Alsa is not runnig properly. I have installed Qjackctl, which is JACK audio Connection Kit and it shows these error messages: Could not open ALSA sequencer as a client. ALSA MIDI patchbay will be not available. ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory.

In the directory "snd" there is really no "seq". Do you have an idea how to push it there?

Thank you

It seems that midi modules are missing in the kernel and this is the problem why there is no sound coming from MuseScore. A score is played, though, but no sound going out. Any idea what to do? Thank you

Well lack of midi module in android-linux kernel suggests that will be very difficult or impossible to get any sound out in an android-linux chroot. I'm wondering if that is for all android-linux kernels. According to https://source.android.com/devices/audio/midi.html only the most recent androids might have midi support:

Beginning with the Android 6.0 (Marshmallow) release, device makers can enable optional MIDI support in the platform.

I'm running android 6.0.1, since I'm using latest nightly CyanogenMod, so I might actually be able to use midi, but you might be out of luck.

I'm curious can you export score as .wav? Can you export score as .midi? Then are you able to open and listen to the score elsewhere, like on your computer?

I can export midi or wav from MuseScore and play it on a desktop or even in this Android tablet, I have Android 4.1.1 and in the Android mode I can play midi or wav without troubles, but not when I am in Linux chroot. Still, it would be great if I can edit or create a score in the Linux chroot and check the notes from time to time.

This is a bit about the kernel thing:

When starting Qjackctl:
16:03:55.391 Patchbay deactivated.
16:03:55.497 Statistics reset.
16:03:55.545 Could not open ALSA sequencer as a client. ALSA MIDI patchbay will be not available.
ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory

When using "sudo modprobe snd_seq":
FATAL: Module snd_seq not found.
FATAL: Error running install command for snd_seq

And then some developer answered (http://udoo.org/forum/threads/midi-configuration.1183/):
Thank you guys for reporting that. The current kernel doesn't have the midi modules enabled. We'll recompile it including the missing modules, once done that it will be sufficient for you to upgrade to the latest kernel as described here: http://www.udoo.org/update-procedure/

The above relates to a laptop: Linaro Ubuntu 12.04 LTS v2.1 with an UDOO Quad, but my tablet has exactly the same troubles.

It seems, though, that there are some chances to play midi in the chroot. There is this synthesizer called Zynaddsubfx and it plays when I touch the attached keyboard. Before I can play, though, it says: "Default IO did not initialize. Defaulting to NULL backend." And this NULL is a MIDI driver, there are 4 available MIDI drivers: ALSA (default), JACK, NULL, OSS.

So is there any chance to play MuseScore with this NULL driver? Or somehow to use this Zynaddsubfx during MuseScore score´s playback? The sound fonts (bank) of the Zynaddsubfx have the ending: xiz

Thank you

A while ago I installed Arch Linux with Gnome enviroment to see if midi is working here, so that I can try running MuseScore here. Unfortunately the included Terminal doesnt work here. So I needed to install another terminal here. The problem is that I dont know to install a package here without a functioning terminal. I was advised to hit Ctrl Alt F2 to initiate a full screen terminal. When I do that, only a small Run box appears saying Enter the command you want to execute. When I do su - root and then pacman -S lxterminal sudo, nothing happens, the Run box just dissapears. Is there another command I need to use? Can I install a package from the Run box? Or is there another way how to install a package without the non-functioning terminal? I googled a lot, but did not find anything, sorry. Thank you

I read this all very quickly but MIDI support on given platform has virtually nothing to do with MuseScore ability to play since MuseScore generates audio and send audio to the system. The MIDI stuff is completely internal. Or put differently, there is no MIDI out in MuseScore (except via JACK midi, but that's something different)

Oh, I see. Still is there a way how to install a terminal without a non-functioning terminal (comment #83)? I would like to see what MuseScoe will do in the Gnome enviroment. Thank you

Terminal and audio (mp3) works for me in Ubuntu as well as in the Arch Linux. Only in the Arch Linux in the Gnome environment, the terminal doesn´t work, audio works. But I would like to try this Gnome environment, because this is the most complex environment (unlike LXDE) and perhaps MuseScore will make a sound here? Does it make sense? But I need to install MuseScore first and some other applications, but since the terminal here doesn´t work, I cannot install MuseScore and other applications. So, it there a way to execute packages in the Gnome environment without the non-functioning terminal?

When I press Ctrl Alt F2, only a small Run box appears. Can I execute packages from here?

Thank you

Unfortuantely the Run box disappears and nothing happens. Is there another way how to execute a package without a terminal? If not, no problem, I can just tell you what I have achieved in the LXDE enviroment with MuseScore reg. the sound..

Thank you

Lasconic is correct in #84, thanks for clarifying that.

I'm here to tell you that I've sucesfully run musescore in an android chroot and can hear playback sound and can input notes with virtual keyboard. I've done this not through VNC, which has overhead of compression and which requires a full desktop environment, but instead I've used XSDL, which is a basic X-Server that has a pulse-audio sink on it. I made amateur video https://youtu.be/7k2angBzfvY (although I could have made simpler), and put all the gory details in the video description and copied here:

@0:00 - I'm showing that I'm using the following settings for LinuxDeploy:
              - Distro: Debian
              - Distribution suite: sid
              - Architecture: armhf
              - Installation type: File on sdcard, auto calculate size, filesystem auto
              - User name, password: android, changeme
              - Desktop environment: I used LXDE here, but note that is should not be necessary to install full desktop environment if simply want to use one GUI application, in this case musescore...so could save on resources by selecting XTerm as desktop environment (which will just install XTerm as the only GUI application to start with).
              - SSH enabled
              - GUI enabled
              - Graphics subsystem: X Server
              - GUI settings: Display=0, X server address = 127.0.0.1
@0:20 - press back to get out of settings, and then press Start to mount and launch the image.
Next, I had to sudo apt-get update and then sudo apt-get install mscore (which installed 2.0.2 and all the needed qt libraries), which I haven't recorded in this video.
@0:29 - I open ConnectBot, and ssh into the chroot android@127.0.0.1 (which is the local host) and enter the default password "changeme"
@0:49 - I enter commands:
             - "export DISPLAY=127.0.0.1:0" (which indicates where the X-Server will be, since will connect to XSDL running on localhost)
             - "export PULSE_SERVER=tcp:127.0.0.1:4712" which is the address for XSDL's Pulse Audio server, which it tells me to use.
@1:29 - I try running mscore, but realize I forgot to start XSDL first, so complains could not connect to any display...
@1:35 - I start XSDL, and then go over some settings...For video settings I had to check auto-detect screen orientation and portrait/vertical screen orientation so I could use in portrait mode.  And for Audio buffer size I set to small, but note that I still had choppy and laggy audio regardless of buffer size.
@1:53 - I press back and then before the 3-second timer runs out to change resolution, I tap the screen, and then pick a screen resolution, and then a font size (I choose the smallest font I can read, so that the text in mscore isn't too big).
@2:10 - the x server is started, and in the background wallpaper it shows me the commands I typed in earlier (which I already did earlier in this video...but note that you should use 127.0.0.1 which is localhost, since the 192.168.0.11 ip address it displays here for wifi, but I don't want to send all the X data and pulse audio over wifi).
 @2:12 - I go back to ConnectBot (unforuntately in this video I had to reconnect since I somehow got disconnected, and then I re-start the image in LinuxDeploy)...so please skip over untill @3:51 when I finallay am able to type mscore from inside connectbot terminal.  Note that nothing happens in connectbot, but I have to switch to XSDL @3:57 at which point you see the musescore 2.0.2 popup window.  Note there is the annoying Loading popup bug, which has been fixed in 2.0.3, as well as the annyong long stem bug which has been fixed in nightly.
@4:21 I press a note, and you can hear it play back after maybe ~0.5 second delay.  Then I play the first measure...note audio is choppy.
@4:35 I verify that I am able to input notes using keyboard buttons, but takes closer to a full second for layout to update and note to sound.  I've also tested that I'm able to save & load scores.  Presumably anything that woks on a linux arm real machine should work in this chroot.

This device is running CyanogenMod 12.1-20160219_NIGHTLY-d2tmo running android 5.1.1 and linux kernel 3.4.109-cyanogenmod-g2cf3722

I'm veryfying that I'm able to reproduce the above steps on archlinuxarmv7h chroot (instead of debian chroot).

Also, note didn't need to install a full desktop environment, but all I needed to select in LinuxDeploy setup is :Desktop environment: = "XTerm", and "Select Components to install": "SSH server" (don't need to check the boxes "Desktop Environment" or "VNC server" or "X server"). Now convieably, I don't need an ssh server running if do these following steps on first boot:

ssh into the chroot (either ConnectBot via android@127.0.01 but only if you have a bluetooth keyboard, else it is better to ssh from a computer with a decent keyboard via android@whateveripaddressyourandroidis).

First, it is easier to create a script which exports the display and pulse server variables, so that can easily execute mscoreCreate a script start.sh and then copy & paste the following in (if use vi from terminal, press "i" to insert, and ":wq!" to write and quit):

#!/bin/bash

export DISPLAY=127.0.0.1:0
export PULSE_SERVER=tcp:127.0.0.1:4712
mscore

and make sure to

chmod +x start.sh

Now go to LinuxDeploy configuration, and enable "Custom scripts" and in "list of scripts" remove the script already listed and replace it with "/home/android/start.sh", and also in "GUI Settings" if I check the box "XServer XSDL" then it automatically starts XSDL when start the LinuxDeploy image, and since will start musescore from this start.sh, there is now no need to have an ssh server (so can remove from LinuxDeploy configuration).

Then

cd /home/android/Documents/MuseScore2/Soundfonts

and download the smallest soundfont available (listed on https://musescore.org/en/handbook/soundfonts smallest is TimGM6mb.sf2, but what I'd really like is something like a super small soundfont that is basically just a square wav to save on resources):

sudo pacman -S wget
wget http://sourceforge.net/p/mscore/code/HEAD/tree/trunk/mscore/share/sound/TimGM6mb.sf2?format=raw -O TimGM6mb.sf2

Then in XSDL in go to View->Sythesizer and add the soundfont TimGM6Mb.sf2 and set as default. Note, unforuntately, won't be able to close the synthesizer window, because we are just in X without a desktop environment, which means no minimize/maximize/close window buttons, and since the synth window si on top and since there is no default keyboard shorcut for it, there is no way to close it...so just force restart XSDL and then restart the LinuxDeploy image (hopefully this time will auto-start mscore and auto open XSDL). But I just realized it is easier to just edit the synth xml file from inside an ssh terminal, by editing

/home/android/.local/share/data/MuseScore/MuseScore2/synthesizer.xml

to replace FluidSynth soundfont with TimGM6mb (and to remove the unecessary effect which might cost some resources), so looks something like synthesizer.txt.

Also, mscore is much easier with a bluetooth keyboard and mice when inside android. But I was thinking about a simple usability solution for note input: one way is create a custom virtual android keyboard specifically to use with musescore android chroot which would contain a small piano keyboard (android let you create virtual keyboards with buttons shaped however you like!) and then have each button send proper command to the chrooted mscore (that might be a little hard...and maybe create buttons on the keyboard for each note duration, or maybe use the corresponding midi commands which can be set in MuseScore->Preferences->"Note Input"->"MIDI Remote Control").

I might also make a feature request to "UI improvements for running MuseScore without a desktop environment" which would do things like have all windows either have a way to close or be always docked, so that don't run into situations where you open up the synthesizer window and then can't close it (maybe specify a command at startup to invoke this mode). Or maybe it is as simple as making some xml configuration file.

To answer DusanP's query on how to install a terminal window without a working terminal window:

You can ssh into your chroot, and then exectue any terminal command, including sudo pacman -S gnome-terminal. You can ssh either from inside the android using ConnectBot, or from another desktop machine if you know the ip address of your android. But please read my comments #90 & #91 where I've managed to get audio playing on andoird using the program XSDL which is an X-Server that includes a pulse-audio sink (which allows you execute a shell command to direct pulse audio output to XSDL).

regarding how to close the Synthesizer window, I've discovered on desktop I can do Alt->F4. However, although my bluetooth keyboard for android has a "fn" button and a corresponding button "next song" with function "F4", unfortunately, I'm unable to do Alt->Fn->"next song" to issue the Alt->F4 command. Any other ideas are welcome. I also can't determine the criteron for why some mscore windows have a close button built into their qt layout, but others like Synth do not have a close button built in.

Wow, I am impressed and look forward to start the process! Now I will make a coffe and go for it.. Thank you very much! :-)

Hi, I have installed everything and it is choppy also on my tablet. Do you think that through VNC it would be also choppy? Could this be a problem (what you have said above): "...I've done this not through VNC, which has overhead of compression and which requires a full desktop environment..."?

Many thanks

If it is choppy through XSDL, then I think it will be (more) choppy though VNC due to overhead.

The choppiness is simply a matter of limited CPU capabilites and the amount of data for audio. Note that the problem is not ARM, and I know that because I'm running mscore on a 1.98z Quad core ARM right now, and it is completely smooth. Let me summarize the datapoints we have between you and me:

My C201 native arch linux is Quad-core ARM Cortex-A17 @1.8 GHz and is very responsive!
My Samsung S3 phone chroot is dual-core Qualcomm Snapdragon S4 @1.5 GHz and is choppy :(
Your android tablet chroot is Dual-Core Cortex A9 @1.5 GHz, and you say is choppy :(
My RPi 1 (single core) @900Mhz is very choppy (but usable), and my RPi 2 @900Mhz (quad core) is a little less choppy.

So I think this means mscore is very close to being able to run smoothly in chroot on dual core 1.5GHz.

I am hoping there is a way to lower the synthesizer's drain on CPU. Like I said earlier, maybe use a super-lightweight soundfont (like square waves) for all instruments. Also maybe edit configuration to reduce the rendering bitrate & samplerate.

I wanted to mention on last configuration that I need to figure out how to easily set with the (remote) XSDL is to have the start.sh script querty the X-Server for width & height of screen, and have mscore preferences set size=@Size(%width %height) so can have a full screen same size as x-server. (note: usually people use desktop enviornments to figure out the width & height, but that is more difficult to figure out without desktop environment).

You could try all the different audio servers listed in Edit -> Preferences -> IO to see which works best. Choices are PulseAudio, PortAudio, ALSA and JACK. You'll have to install any you don't already have on your system.

I try to play with the system, but I have troubles to stop the X-server, I mean the whole X-server XSDL. I am able to stop it only in the Android Settings: Force stop, which is not ideal, I suppose. When I launched the system for the first time, it was choppy, but played, now it even doesn't play.. XSDL application starts quite strangely, about 10x restarts until it connects and it asks me to use address 10.0.0.6:6 and 10.0.0.6:4712. Is it all Ok?

I think it connects me through my Wi-fi, because when I disable it in my tablet, XSDL doesn't show any comands to use in the ConnectBot for connection. What should I change, do you have an idea? Thanks

XSDL has a non-standard interface: they've mapped the android "back" button to trigger their virtual keyboard. The way I'm able to stop it correctly is to pull down my notifications from top of my android screen, and then should see a tab for XSDL with a button labeled "STOP" which you can press.

address 10.0.0.6 is clearly the ip that the DHCP server on your Wi-Fi router is allocating for your android. While it is possible to send X data and pulse audio data over the wifi, you wouldn't want to do this if you are communicating just from inside your single android device. So it is better to just use the standard localhost 127.0.0.1 address (which is known as "loopback" interface...since whatever network packets are sent there from your android will simply loop-back and return to your android without actually traveling through air). Note, that if you want to for fun, you can run x-programs from any linux computer in your house and have their window and audio be on your android phone (just before you execute whatever program do export DISPLAY=yourandroidwifiip:display# and similiarly for pulse)!

Regarding the last letter in that address ":6" is the X-Server display number. There can be a different display number for every X-Server running on a particular machine, so that number might be different every time you execute XSDL. For me, it always gave me ":0" but if you are executing XSDL multiple times, it might be incrementing the display number, which would explain why it is giving you ":6". So waht you need to do is either reboot your android (so that next time XSDL would likely start with ":0"), or you need to change the ending part of export DISPLAY=127.0.0.1:0 into :6 (but I think restarting android and keeping display number :0 is easier).

Note: you do not need to restart the XSDL program every time that you want to restart your chroot. It is merly an x-server, and thus will display any windows from any computers on your network or android that send x windows to it.

Regarding shoogle's comment #99, I don't actually think that anything other than PULSE will work with this XSDL program, since XSDL is providing a pulse sink, but not a sink for any of those other programs. (FYI, one of the neat features of PulseAudio is that it is designed to work very easily over the network interfaces).

So I think the problem is that I cannot connect inside the tablet, it connects me only through Wi-fi. When I disable Wi-fi, XSDL shows a blue screen showing which commands to use and there are no commands. Then in ConnectBot I use 127.0.0.1:0 and MuseScore never appears in XSDL. Only when I enable Wi-fi, the blue XSDL screen shows commands with 10.0.0.6:6 and then I connect. But it is through Wi-fi. What do I do wrong, do you have an idea? Thanks

I think the problem is you need to use: DISPALY=127.0.0.1:6

Whenever you start XSDL, after loading and setting resolution, it will say:

"Launch these commands on your Linux PC:

export DISPLAY=IP:N
export PULSE_SERVER=tcp:IP:4712
metacity & gimp

To tunnel X over SSH, forward port 6000
in your SSH client"

Where IP is your android's wireless IP address, and where "N" is some small integer representing the display number which XSDL is hosting the X-Server at. For me, "N" is always 0, but for you it seems "N" is currently 6. Just use whatever "N" it is providing you.

NOTE THAT YOU DO NOT NEED WIFI. I'm am verifying right now that I can disable WIFI, then start XSDL (note it won't tell me any ip address...it just says Launch these commands on your Linux PC: To tunnel X over SSH, forward port 6000 in your SSH client), but I assure you that I'm able to simply use loopback interface 127.0.0.1.

Yes, it was like this, I had to use the current number. The only trouble was that when disconnecting Wi-fi, I did not see the 10.0.0.6:6 addresses, it was blank and the number was increasing and I was not sure what is the curent number. But then I noticed that the forward port number shows the needed number: 6000, 6001, 6006, etc. from which I use only the last one.

The video size is incorect and I cannot close any opened window. Do you also have it like this? Any idea how to fix it? Thanks

Good you figured that out. Interesting how final digit of port number actually corresponds to display...I don't know if that is consistent behavior or not.

Interestingly, the guy that makes XSDL "pelya" says https://github.com/pelya/xserver-xsdl/issues/15 that:

XSDL accepts connections from amywhere, even from outside of your network. You may just specify DISPLAY=:0 for your chroot environment, it will use Unix socket.

And I've verified that I'm able to use just DISPLAY=:0 on my phone. Also this should be slightly faster than going through 127.0.0.1 I think (because don't need to wrap all the X data inside of unnecessary network packets, which is my understand of how communication through 127.0.0.1 works, which would also save on memcopys). "pelya" then says:

For best results, download this library to your chroot: https://github.com/pelya/cuntubuntu/blob/master/dist/libandroid-shmem.so?raw=true then do export LD_PRELOAD=/path/to/libandroid-shmem.so It will enable shared memory between XSDL and Linux apps, so they will draw a tiny bit faster.

Now I haven't tried that yet...will verify. It would indeed be faster by avoiding unecessary memcopys. I have made a feature request to have the text instructions indicate how to use localhost...see https://github.com/pelya/xserver-xsdl/issues/59

Regarding "The video size is incorect" I mentioned earlier that I'm looking into a way to figure out the X-Server's width & height, and then forward that to musescore. For the time being, you can edit the MuseScore configuration file (~/.config/MuseScore/MuseScoreDevelopment.ini or ...MuseScore2.ini) and in the section [MainWindow] change "size=@Size(1024 768)" to reflect whatever resolution you choose for your XSDL server.

Regarding "and I cannot close any opened window" I mentioned this earlier that unfortunately some of the popup windows like synthesizer will not be very easy to close when running just X without a desktop environment. I might make a feature request to facilitate this.

In addition to setting size equal to the resolution of your tablet, I would also suggest setting pos=@Point(0 0) instead of the default (10 10), and I also set maximized=true. So now I have a full-screen mscore without any pixels lost to top window bar or the DE's main bar. Here is what my .ini [MainWindow] section looks like after those changes:

[MainWindow]
debuggerSplitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\xf4\0\0\0\x32\0\
xff\xff\xff\xff\0\0\0\0\x2\x1)
maximized=true
pos=@Point(0 0)
showInspector=false
showPanel=true
showPianoKeyboard=true
showSelectionWindow=false
size=@Size(1280 720)
split=true
splitScreen=false
splitter=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x1\0\0\0\x83\x1\xff\xff\xff\xff\x1
\0\0\0\x1\0)

Note, I'm discovering on internet that there is likely no easy way to query the X server for the width & height without using a desktop environment. So it seems that setting size in the ini will be the only realisistic way to get a full screen interface in plain X.

Ok, I tried out pelya's special library for rendering X directly to shared memory, and it works on my android (which is ARMv7) archlinuxarm chroot, but note that that library is precomipled for ARMv7 so won't work on earlier ARMv6 (but I think your tablet is good). Anyway, the instructions to use it would be:

start LinuxDeploy image
ssh into android@yourandroidipsaddress
wget https://github.com/pelya/debian-noroot/raw/master/dist/libandroid-shmem…
export LD_PRELOAD=/home/android/libandroid-shmem.so

and then can start musescore using the script (./start.sh). After downloading, you can just add the export LD_PRELOAD=/home/android/libandroid-shmem.so into start.sh before executing mscore.

For reference, I'm noticing shmem.so is printing debug messages to my ssh terminal, which seem to indicate that it is working correctly:

[android@localhost ~]$ ./start.sh 
initScoreFonts 0x22497b8
shmget: key 0 size 483916 flags 01600 (flags are ignored)
shmget: bound UNIX socket /dev/shm/000046ea
listening_thread: thread started
shmget: ID 0 shmid 46ea0001 FD 10 size 487424
shmat: shmid 46ea0001 shmaddr (nil) shmflg 0
shmat: mapped addr 0xaadb2000 for FD 10 ID 0
shm_remove: deleting shmid 46ea0001
shm_remove: shmid 46ea0001 is still mapped to addr 0xaadb2000, it will be deleted on shmdt() call
init Help from: 
shmget: key 0 size 1843200 flags 01600 (flags are ignored)
shmget: ID 1 shmid 46ea0002 FD 19 size 1843200
shmat: shmid 46ea0002 shmaddr (nil) shmflg 0
shmat: mapped addr 0xa2cb8000 for FD 19 ID 1
shm_remove: deleting shmid 46ea0002
shm_remove: shmid 46ea0002 is still mapped to addr 0xa2cb8000, it will be deleted on shmdt() call
shmget: key 0 size 717600 flags 01600 (flags are ignored)
shmget: ID 2 shmid 46ea0003 FD 22 size 720896
shmat: shmid 46ea0003 shmaddr (nil) shmflg 0
shmat: mapped addr 0xa23d0000 for FD 22 ID 2
shm_remove: deleting shmid 46ea0003
shm_remove: shmid 46ea0003 is still mapped to addr 0xa23d0000, it will be deleted on shmdt() call
shmget: key 0 size 38400 flags 01600 (flags are ignored)
shmget: ID 3 shmid 46ea0004 FD 23 size 40960
shmat: shmid 46ea0004 shmaddr (nil) shmflg 0
shmat: mapped addr 0xa5001000 for FD 23 ID 3
shm_remove: deleting shmid 46ea0004
shm_remove: shmid 46ea0004 is still mapped to addr 0xa5001000, it will be deleted on shmdt() call
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.

Many thanks! I did the "wget", then "export" and then did not understand how to continue, sorry. Can you please explain? Thank you

easiest to just include "export LD_PRELOAD=/home/android/libandroid-shmem.so"
inside the start.sh file we created earlier, so looks something like (although with your display #):

#!/bin/bash

export LD_PRELOAD=/home/android/libandroid-shmem.so
export DISPLAY=:0
export PULSE_SERVER=tcp:127.0.0.1:4712
mscore

then ./start should set those variables correctly and execute mscore.

FYI, I'm currently looking at ways to have pulse audio speak directly to XSDL's pulse server (without going through loopback interface) but no luck yet (I'd like to do something similar to https://wiki.archlinux.org/index.php/PulseAudio/Examples#PulseAudio_fro… )

I've discovered that I can lower alsaSampleRate in MuseScore.ini and that reduces choppines of playback (simply because less bytes need to be produced and copied). Here is video playing reunion:

https://youtu.be/bUXapf8IpHY

I reduced alsaSampleRate from 48000 Hz to only 4000 Hz. For reference, 4000 Hz is just under the highest note (C8) of a 88-key piano (https://en.wikipedia.org/wiki/Piano_key_frequencies). So as long as notes don't get too high, isn't terribly an issue, although quality of note timbre will reduce due to loss of higher harmonics, and also the very highest notes will have their harmonics above 2000 Hz get aliased and mirrored back below 2000 Hz (you might be able to hear that aliasing the very end of reunion with highest notes). But that is tolerable.

Unfortunately, the audio still feels a little uneven...I almost feel as some measures are unintentially cut short so they are more like 7/8 measures.

Note that in that video I have an ssh terminal from my computer and when I press enter I'm executing ./start.sh, then you can see the splash screen appear on my android.

I would like to reduce the bitrate so use 8bit audio instead of whatever alsa is using as default (probably uses 16bit or 32-bit float?) to reduce processing demands even more. But I don't know of a way inside the .ini to reduce that...does anyone else know?

I timed the latency on my Samsung S3 I used in that video, and when pressing a note in Reunion, it takes close to 2 seconds for the audio to sound. And when inputting a note in Reunion, it takes close to 1 second for the note to display, and then another 1 second before hearing the note.

I think any modern flagship android will have no problem, though, as my S3 is close to 4 years old.

I've been investigating further, and I've discovered that this "pelya" github user is very prolific, and interestingly has made a version of GIMP+InkScape avialable on google play, which uses a debian chroot that doesn't require root (using some technique called proot). Other than that it basically uses this same XSDL of his that I've been using in this thread. Anyway, I'm trying out his debian noroot https://play.google.com/store/apps/details?id=com.cuntubuntu and it installs pretty quick, no complicated configuration, and has presented me with a nice debian jessie desktop. I first tried apt-get musescore, but that didn't work, so then I ran apt-get update and then apt-get upgrade (although the upgrade takes forever, and may not be necessary to run musescore). Musescore 1.3 installs and runs, but unforutunately, I have yet to get audio working. I've tried vmpk which says can't create ALSA, and qfluidsynth says can't create jack. So I'm going look into that later. Interestingly it is not a full chroot, so some of these things like audio might be a little more difficult. I notice that he is using that libandroid-shmem.so library cuase I see those similar debug messages being used. I'll try looking into audio a bit more, and might ask him a question on his github.

Still I am afraid I am unable to use the recommended settings from pelya. First, downloading with wget was very fast (1 second) - is this right? Second, I have not made a start.sh script yet, because I was not sure hiw to create the start.sh file and I used only ConnectBot termial where I put the lines bellow. Should it work like this? Or should I make the start.sh file first? How do I create it? In the ConnectBot terminal so far I put these lines:

Arch Linux [running on Android via Linux Deploy]
[android@localhost ~]$ #!/bin/bash
[android@localhost ~]$ export LD_PRELOAD=/home/android/libandroid-shmem.so
[android@localhost ~]$ export DISPLAY=:0
[android@localhost ~]$ export PULSE_SERVER=tcp:127.0.0.1:4712
[android@localhost ~]$ cd /usr/bin
[android@localhost bin]$ ./mscore

Thank you

what you typed directly into terminal should work.

I say it is easier to put things into a script and save the script as a file. That way whenever you want to execute mscore, you don't have to type everything again.

Alternatively, you can put those export lines inside ~/.bash_profile so that whenever you start a terminal, those variables are set.

Is there a way I can check that I use the recommended settings? Because it seems to me I use the original sounds - they react absolutely the same way choppy and the color iof the sound is the same. I should hear a bit different sounds, right? Thanks

I realize the mistake: LinuxDeploy will execute the start.sh script we made as the *root* user, however the MuseScore preferences file we edited was the regular *android* user.

To use the same settings for root & regualr android user, after closing quiting musescore, type the following into an ssh terminal:

sudo rm /root/.config/MuseScore/MuseScore2.ini
sudo ln -s /home/android/.config/MuseScore/MuseScore2.ini /root/.config/MuseScore/MuseScore2.ini

If you run ./start.sh from ssh terminal, then you should see various messages printed to screen starting with "shm..." which should indicate that you are using the shared memory library to help out screen rendering.

I'm now realizeing by looking at LinuxDeploy messages when shutdown, that my start.sh script isn't really a proper startup script since it needs to have a startup and shutdown section.

Let me please double check if I understandood correctly:

I used these commands in the ssh terminal (ConnectBot terminal, right?):
[android@localhost ~]$ #!/bin/bash
[android@localhost ~]$ export LD_PRELOAD=/home/android/libandroid-shmem.so
[android@localhost ~]$ export DISPLAY=:0
[android@localhost ~]$ export PULSE_SERVER=tcp:127.0.0.1:4712
[android@localhost ~]$ cd /usr/bin
[android@localhost bin]$ ./mscore

Then I got these lines in the ssh terminal (ConnectBot terminal), but with ERROR right in the beginning:

[android@localhost bin]$ ./mscore
initScoreFonts 0x1fe8f48
QXcbConnection: XCB error: 151 (unknown), sequence: 165, resource id: 0, major code: 144 (unknown), minor code: 20
shmget: key 0 size 483916 flags 01600 (flags are ignored)
shmget: bound UNIX socket /dev/shm/000013cb
shmget: ID 0 shmid 13cb0001 FD 10 size 487424
shmat: shmid 13cb0001 shmaddr (nil) shmflg 0
shmat: mapped addr 0x4c0f1000 for FD 10 ID 0
listening_thread: thread started
shm_remove: deleting shmid 13cb0001
shm_remove: shmid 13cb0001 is still mapped to addr 0x4c0f1000, it will be deleted on shmdt() call
etc...

Then I quit Muse Score in the XSDL X-server and wanted to do the 2 following commands in the ssh terminal (ConnectBot terminal):

[android@localhost ~]$ sudo rm /root/.config/MuseScore/MuseScore2.ini
[android@localhost ~]$ sudo ln -s /home/android/.config/MuseScore/MuseScore2.ini /root/.config/MuseScore/MuseScore2.ini

Is it correct? So far I did not need to make the start.sh file, right?

I did only the first one and I got an error message:
rm: cannot remove '/root/.config/MuseScore/MuseScore2.ini': No such file or directory

Any idea? Thank you

let me preface by saying that I am making up these steps as I'm figuring them out, and that ideally I would make a clean static page of instructions once all the hiccups are figured out. Unfortunately right now some things are getting miscommunicated and out of order due to this thread.

FIRST: if you are just typing inside the ssh terminal, then you don't need to start with

[android@localhost ~]$ #!/bin/bash

as we are already inside a bash shell since we are in ssh terminal.

The next 3 lines:
[android@localhost ~]$ export LD_PRELOAD=/home/android/libandroid-shmem.so
[android@localhost ~]$ export DISPLAY=:0
[android@localhost ~]$ export PULSE_SERVER=tcp:127.0.0.1:4712

setup environment varialbes. To save time from typing in everything, I put in the start.sh script (but they could also be in .bash_profile).

your next two lines:

[android@localhost ~]$ cd /usr/bin
[android@localhost bin]$ ./mscore

could be simplified with just:

[android@localhost ~]$ mscore

since /usr/bin is always in $PATH.

Now since you are running as regular user "android" and not as root user "root", then it is not necessary for you to do those final two lines:

[android@localhost ~]$ sudo rm /root/.config/MuseScore/MuseScore2.ini
[android@localhost ~]$ sudo ln -s /home/android/.config/MuseScore/MuseScore2.ini /root/.config/MuseScore/MuseScore2.ini

The only reason I said to execute those two lines is incase you want to have a start.sh script which will automatically start musescore when starting LinuxDeploy image.

But what you do need to do before starting mscore is to change MuseScore2.ini in your user directory to modify alsaSampleRate to only 4000 Hz. You will need to know how to use vi editor if your are editing over ssh, so type in:

vi ~/.config/MuseScore/MuseScore2.ini

and then navigate to the line with alsaSampleRate, navigate right to the 48000 so that your cursor is directly over the "8", and then press the letter "x", and you should see that 8 get removed so alsaSampleRate is now 4000. Then save & quit by typing ":wq".

I see you updated your comment while I was typing. Please avoid doing too many edits, but when you do make an edit, please use words "EDIT:" so I know what is different, and instead of deleting what you didnt' mean to write, I prefer it when those words are just strikethroughed using html tags "del".

Looks like you copied and pasted some text, but I can't see it because this forum uses markdown formating. It it is best to enclose the text you want to display unformated by enclosing with html tags "pre".

See the Input format link below for more info how do use "pre" and "del".

like I said in #117, you have those environment varialbes correct, as evidenced by the fact that we see those shm messages on terminal window. But you will need to edit your regular "android" user's MuseScore2.ini settings to reduce alsaSampleRate to 4kHz.

I read the format link bellow, but I must admit I don´t understand it, sorry. For copying above I used your text from comment #107 and modified it so that I don´t have to write everything completely. It was the debug messages from my ssh terminal. Is it visible now? I put the text to a Notepad and then back to a comment #121, so there should be no formatting, I suppose:

After I start MuseScore I see the debugg messages, but with ERROR right in the beginning:

[android@localhost bin]$ ./mscore
initScoreFonts 0x1fe8f48
QXcbConnection: XCB error: 151 (unknown), sequence: 165, resource id: 0, major code: 144 (unknown), minor code: 20
shmget: key 0 size 483916 flags 01600 (flags are ignored)
shmget: bound UNIX socket /dev/shm/000013cb
etc...

Reg. changing the frequency to 4000 Hz, I understood that you downloaded the library from pelya and the sound worked without additional changes. So you also had to change the frequency? Thanks

I see your console output text now. Those shm library messages aren't errors, I think.

regarding errors on console, a lot of errors don't actually prevent mscore from executing. For instance, I get "QNetworkReplyImplPrivate::error: Internal problem, this method must only be called" but mscore still runs. Does that QXcb connection error prevent mscore from running?

Re changing the frequency to 4000 Hz: The shm library only facilitates rendering windows, not audio. It would be nice to have it help out with rendering audio (to avoid loopback interface), but pelya has not implemented that. In order to change frequency to 4000Hz, you have to manually edit the MuseScore2.ini file. FYI, you can do the same thing on your regular desktop linux if experiencing choppy audio.

Oh, I see. I have changed the frequency to 4000, it is kind of spooky, but not choppy, and for checking the score it will be ok, I do the sound on the Desktop, so for checking this is fine. I would like to try 8000, how do I change 4 to 8, please? I did not manage so far, thanks.

you can google for "vi cheat sheet" to learn the basic commands for vi. It is a very useful text editor, especially if you only have access to a terminal, like when doing ssh. To change the 4 into 8, first navigate the cursor so it is over the "4", then press "r" (for replace), then press "8", then press ":wq" (which issues command Write and Quit).

You might be able to fiddle with the alsaPeriodSize (make sure it is power of 2, though), and maybe even alsaFragments. Changing those might help reduce (or increase) the latency you experience, but more discussion on that is on internet. Unfortunately sound is bad with 4kHz, but feel free to experiment and find something that doesn't sound too bad while isn't choppy. For editing on android, only just need something usable (i.e. can hear the pitch, volume, articulation, and can distinguish instrument) even if doesn't sound great.

Not to start a flame war... but you might find nano a bit easier to use than vi because it doesn't have any special shortcuts you need to learn in order to edit. It has a few shortcuts, but they are always displayed at the bottom of the terminal screen.

The only ones you need to know are:

  • ^O (i.e. Ctrl+O) - save (overwrite) the current file
  • ^X (i.e. Ctrl+X) - exit

Thank you guy for the tips. Now I will play a bit with the system to find a convenient compromise.

Now I start only MuseScore using ConnectBot and X-server. If I wanted to start the whole Desktop environment using ConnectBot and X-server, what the command would be, please? I cannot find it. Thank you

To have full desktop environment, youd best use LinuxDeploy config with LXDE (maybe create a new image, since don't want to loose what is working...but there might be hiccups as I recall, audio might be difficult, and I might not be able or want to help figure that out again.)

I understand, I am happy with the present installation, thanks a lot for it. And what is the command, please? Thank you

I have downloaded the new updated version of X-server XSDL and I cannot connect audio... Do you know about the new version?

pelya did just release a new version of XSDL, but there should be nothing you need to change to get audio...I've verified that I'm still able to use my ./start.sh command and can playback.

FYI, pelya added instructions on the background screen of XSDL, in response to my request (which is why you got the googleplay update):

https://github.com/pelya/xserver-xsdl/issues/55#issuecomment-188424183

So now it says "If you run Linux in chroot on this device, run: export DISPLAY=:0 PULSE_SERVER=tcp:127.0.0.1:4712", so whatever it says on your XSDL screen should be what you want...

Yeah, I noticed it and thought it was you:-) All of a sudden audio started to work... In the afternoon I tried alternative X-servers, none of them worked reg. audio and they probably hurt my tablet.

What is please the command to start the complete desktop enviroment in ConnectBot, please?
EDIT Is it something like boot? Thank you

>> "All of a sudden audio started to work... In the afternoon I tried alternative X-servers, none of them worked reg. audio and they probably hurt my tablet."

The other x-servers might be getting in the way. My advice is remove them all except for XSDL. I am very impressed with XSDL because it has done these important things (like direct memory copy and pulse audio support) which I haven't found in any other android x-server or vnc.

>> "What is please the command to start the complete desktop enviroment in ConnectBot, please?"

If you configued LinuxDeploy to use:

Desktop Environment => something other than XTerm
Select COmponents => ensure DesktopEnvironment is checked
GUI Settings => Display=0 (or whatever XSDL says), X server address = 127.0.0.1, and check XServer XSDL

Then I don't think there is any command you have to type into ConnectBot. The desktop should display on your XSDL automatically when you start your LinuxDeploy image (I would recommend first starting up XSDL before starting LinuxDeploy image, so X server is ready and waiting). However, this won't be getting the sharedmemory feature. And then there is still the issue of running mscore through pulse audio. In order to do that, you would have to either start musescore from a gui terminal inside your desktop environment, but first type "export PULSE_SERVER=tcp:127.0.0.1:4712" before typing mscore. You might try putting that command inside your .bash_profile so all desktop apps know where to send audio.

Thank you for explanation.

Is the main reason that audio now works with MuseScore that XSDL has a pulse audio support? So when I use bVNC without pulse audio support, then I don´t hear MuseScore play. Right. But when I use bVNC (or other VNC) without audio pulse audio support, why do I hear mp3 then? To hear mp3, I must install Gnome video player Totem, the other players might not work. So, if MuseScore had some similar configuration like Totem, could it play with bVNC? The reason why I ask is that bVNC displays MuseScore much better than XSDL, it is much easier to work in bVNC than in XSDL. Thank you

>> "Is the main reason that audio now works with MuseScore that XSDL has a pulse audio support?"

Pulse audio helps out tremendously because it is designed from the start to work over network interfaces. (Look at the first words of https://en.wikipedia.org/wiki/PulseAudio which say "PulseAudio is a network-capable sound server").

>> "But when I use bVNC (or other VNC) without audio pulse audio support, why do I hear mp3 then?"

ALSA audio is (1) being rendered & mixed in the chroot, then (2) is (possibly) being compressed in order to (3) be sent over the loopback interface and then (4) (possibly) be uncompressed. So yes VNC can handle alsa.

But when dealing with PULSE, I think it cuts out a few steps because it is basically (1) render audio to PULSE, then (2) send over loopback interface to PULSE_SERVER. ALSA is really a hardware driver, but since we are in a virtual environment inside the chroot, we don't need to be interfacing with virtual hardware audio devices.

My impression is that there are just a few more steps when dealing with ALSA->VNC, versus just PULSE.

But don't quote me about VNC doing compression (I don't know if it always does that...but if you look at the background wallpaper you will notice that the VNC downsamples the color scheme, so VNC does indeed compress visuals, but then again there are ways to disable that VNC compression). But I have to admit I don't really know current situation and full story.

>> "bVNC displays MuseScore much better than XSDL"

I haven't tried bVNC, but I doubt that. XSDL is rendering as is direct through shared memory (if that library is used), so should be faster. Are you referring to the lack of a Desktop Environment (note you can use a desktop environment with XSDL).

I apologize if I'm proliferating mis-information. There are a lot of things going on in background, and I'm not fully aware. Ideally we'd be able to take control of and write directly to android's framebuffer and audio out.

Thank you for explaining. So when I play mp3 and I hear it using Totem player, ALSA is used, the sound is not choppy and the quality is perfect. So if MuseScore had some similar configuration like Totem, it could use ALSA to play, right? (I know that ALSA is an option in MuseScore, but it never worked to me.) Would the sound be better and not choppy as with PulseAudio? When I play mp3, it is not choppy and the quality is perfect, but maybe playing mp3 file is different than play a score, I don´t know.. Thank you

I am happy to tell you that I have managed to connect MuseScore to a synth called Zynaddsubfx, the sound is very good and it is not choppy, don´t know too much how it happened, will verify and will tell the details in a few hours..

Before I can make a complete list of things necessary to connect MuseScore with Zynaddsubfx, can you please tell me which file I need to modify so that MuseScore communicates well with Zyn? The sounds in Zyn are controlled by MuseScore by the instruments listed in the Mixer in MuseScore. But they are not chosen in Zyn in a way suitable for working with Zyn. I looked in usr/share/mscore-2.0/instruments.xml, but so far I did not succed, I changed the program value=0, etc, but there is many times there program value=0, so I don't really know what to change. Thank you

EDIT: So far I know that Bank 1 in Zynaddsubfx (Zyn) is used when I use the first 10 instruments in MuseScore Mixer, Bank 2 in Zyn is used when I check Drumset in MuseScore Mixer. Any idea? Thank you

I don't know...never used Zynaddsubfx. You should be able to use Jack with MuseScore, and then use qjackctl (install with sudo pacman -S qjackctl) and then make a connection from MuseScore to Zynaddsubfx. FYI, searching the forums yields https://musescore.org/en/node/10969 but that is a bit old.

The problem you might be experienced is simply a midi channel & port number issue. Make a note of which instruments your are using in musescore, and look up their midi channel/port numbers, and make sure those numbers correspond to input sources that Zynaddsubfx will generate sounds for.

For these generic support with musescore, you're probably best getting a response if you post to the regular support forum. I closed this issue long time ago, and probably most everyone else has probably unfollowed this thread by now.

This is the MuseScore 2 configuration with sound working on my not very powerful tablet in ARM chroot:

Installed packages: jack2, qjackctl, qsynth, soundfont-fluid

Run Linux image in Linux Deploy, as the graphic subsystem you can choose VNC or X-server, both work.

Launch Qjackctl. On startup don't worry about error messages. In Setttings as Audio driver choose dummy. Press Ok. Start the Jack Server with Start button on the main table.

Launch MuseScore (MSC) and choose Jack server in I/O table in the Preferences (make sure Jack midi is checked). After Apply you should see the Play Button in MSC to have become active, a score can be played now, no sound out.

Launch Qsynth. On startup don't worry about error messages. In Setup as midi driver choose Jack, as audio driver choose Alsa, buffer size about 512, frequency 44100. In Soundfont table load soundfont-fluid previously installed which will be stored in usr/share/soundfonts.

Now make sure that all the 3 applications above are on (MSC, Qjackctl, Qsynth). Open Connect in Qjackctl on the main board and go to Midi. You should see mscore on the left side and fluidsynth-midi on the right side. Check them both and on the bottom use Connect. And this should be it. The score is played smoothly, the sound is nice and you can choose sounds in the Mixer in MSC – what you see in MSC is played by Qsynth.

There is a possible alternative in case it doesn´t work: instead of Qsynth you can use Zynaddsubfx synth, but you need to figure out how to control sounds in Zyn by MSC.

As a graphic subsystem of Linux Deploy I prefer VNC (bVNC particularly), because X-server from XDSL has troubles in my tablet (which could be probably solved sooner or later): zooming doesn't work; icons in the bottom panel disappear after a while and only dark, not very visible dots remain (intention?); higher resolution setting distorts proportions of displayed content; the very top of MSC is not visible and like this many popup windows of MSC cannot be closed (using the close button on the top of a window); when changing an image in Linux Deploy, the previous image remains in X-server and tablet must be rebooted to get rid of it; when necessary to stop X-server (e.g. for changing settings), then after starting X-server again, the Display for Linux image is shown on a different number, not on 0 as originally - if you want 0 again, you need to reboot tablet; the included keyboard doesn't appear after update of XDSL. In bVNC make sure that Fullscreenbitmap is checked and Use Hextile encoding (for chroot connections) is checked.

For those who did not read the earlier comments in this thread: Another alternative for sound in ARM chroot is to use PulseAudio with X-server from XDSL. It is necessary to have relatively powerful processor, though. Mine is dual core ARM Cortex A9 and the result is choppy sound. The choppiness can be eliminated by e.g. lowering sample rate or buffer size, but the sound quality is not so good and even then the sound is sometimes choppy.

I'm would like to know why Qsynth runs significantly faster than mscore's built-in synth in this situation. At first I was thinking maybe this is because Qsynth is a seperate thread, but then looking at https://github.com/musescore/MuseScore/blob/cd6dd3edd7a524517682806799f… I see that the musescore sequencer is a seperate thread too. Does anyone have ideas? Maybe is Qsynth using simpler computations? Or maybe is there some performance bug with musescore synth???

I might need to do some careful timing experiments to determine if what is at fault.

In your above case, I might want to try having QSynth use pulse audio as output to the XSDL server, which would reveal whether it is truely QSynth at fault, or the pulse-audio implementation.

Yeah, I also wonder why it is like this.

What about another thing related directly to MuseScore and its internal synth: there is no option (as it is in Qsynth) to use Jack for midi and Alsa for audio - you can use either Jack or Alsa. I tried in the MuseScore configuration file to configure "EDIT Jack" for midi and Alsa for audio, when I opened MuseScore it was really chosen like this in the I/O window, but maybe it did not really work, because when using just I/O window without configuration file, there is no option to separate Jack and Alsa (I mean Jack for midi and Alsa for audio)...

"EDIT: I think that in the previous version of MuseScore there was the option to use Jack and Alsa at the same time: Jack for midi and Alsa for Internal synth. I am not sure whether it could have been used like Jack for midi and Alsa for audio, but anyway when I tried it, I did not hear any sound from MuseScore."

in Qsynth I must use strictly Alsa for audio, otherwise I don´t hear anything. In MuseScore I must use strictly Jack audio server, otherwise Play Button will not become active. So for using internal synth in MuseScore: what about to combine Jack audio server (active Play Button) and Alsa (to hear sound)? At present there is not such an option. I tried to make this option modifying MuseScore configuration file (and the combination of Jack and Alsa really appeared in I/O panel of MuseScore when I opened MuseScore), but maybe to do it like this is not enough.

In the MuseScore version 1.3 in I/O panel I can check Alsa audio and Jack audio server at the same time (intention?), the Play Button becomes active, but I still don´t hear anything.

Well, so maybe the idea of combining of Alsa audio and Jack audio server in MuseScore 2 is not a good idea, I don't know, sorry, or perhaps some different implementation of Jack audio server and Alsa audio than in MuseScore 1.3 would help? Sorry if I write nonsense :-)

Hi, today I have made a score in a desktop version of MuseScore 2 and then opened it in my tablet in the debug version of MuseScore given to me by Eric. I have noticed that chords are displayed only partly: instead of E7 it shows only 7. When I click the chord symbol, it shows E7, but when I leave the chord symbol, again only 7 appears. Is there anything that can be done with it? Thank you

EDIT: In the normal version of MuseScore 2 (I mean installed from repo), the chords are displayed correctly. Thank you

The symptom you describe is what happens if you try running the executable file from some location other than where it is actually installed to. That is, if you have a MuseScore installation in /usr/local, but you try running an "mscore" executable located in ~/bin or whatever, then it won't be able to find the necessary support files. It is important to fully install MuseScore and to run the executable from the installed location. You don't have to "cd" there; the executable just has to be located there.

Hi, I tried what you suggested. I found the installation in /bin, so I renamed the normal mscore file and then copied the debug mscore here. Unfortunately it is the same. I also noticed that the way the error appears is that only the first letter is not displayed, if I type EE7 then E7 is displayed. Any idea? Thank you

you can always goto Edit->Preferences and foricbly replace the style directory with the regular 2.0 install style directory (something like "/usr/share/mscore-2.0/styles/"), instead of installing the debug build.

Possibly the test executable is using a different set of preferences and is looking for the style folder somewhere else. You might try running it with "-F" to make sure it gets the defaults. And, hmm, I would expect the default installation to be in /bin. As far as I know the default for 2.0.2 on Linux is /usr/bin, although maybe that differs by distribution.

It's probably best to ask for further help on the support forum where others will be able to see - there's only a handful of us who will see posts made here.

DusanP is just using something I built a month ago with "make debug". I don't think it will have the mscoreGlobalShare variable set to anything meaningful, which is why I said to just use the mscore 2 style directory.

Regardless, hopefully soon (~week) will get nightly builds for ARM AppImage up and running, which should have a valid style directory on first execution, so I'd suggest wait.

In the meantime, we should probably officially close this thread.

Ok, thank you, I will not use this thread any more. I will go to forum for minor issues now with using MuseScore 2 in ARM chroot (e.g. making bigger space between 2 staves only locally, not in the general setting, if it is possible, I have not found so far).

Reg. the display of chords, I tried what you suggested, I forced debug MuseScore to look in usr/share/mscore-2.0/styles, I tried to force also the other items here (templates, etc.), but it is still the same error. "EDIT: And when I try to load the style of MuseJazz.mss from the normal MuseScore, it tells me that this version is not compatible with my version (debug)." As you suggested, I will wait for the nightly. How will I know that it is available? Can you please let me know in some way? Many thanks

Yes, no problem, as I said in the earlier comment, I will wait. And how will I know that the nightly is available? Where can I check, or can you please let me know in some way? Many thanks

Wow, a second page of comments - quite an achievement!

We'll post here when the ARM builds are ready, but if we forget for some reason then check this page in a week or two: https://bintray.com/musescore/nightlies-linux. Currently there are builds for i686 and x86_64 architectures (32 bit & 64 bit Intel/AMD). When ARM builds arrive they will be labelled something else, probably armv6, armhf or something like that. Run the Linux commands arch or uname -m to find out your architecture, but be aware that the nightlies might still work even if they are called something slightly different to your architecture (e.g. armv6 executables will run on armv7).

Also, look out for the release of MuseScore 2.0.3 (it will be announced on the homepage) and see if there is any information about ARM builds (we can't promise there will be any news, but there might be). Please upgrade to 2.0.3 if you can and delete Eric's development build. If you continue using a development build you may run into compatibility problems if the file format changes before the release.

Thank you very much for the information, I will check it, I work now in MuseScore and there are many new functions that I enjoy a lot! Cheers for now..

Dear all, did you manage to make the ARM nightly for Arch Linux? I tried to check, but did not see anything. Thank you very much

DusanP, I finally got the ARM AppImages (i.e. nightly) built on Travis & uploaded to bintray. Please test this out:

https://bintray.com/ericfont/nightlies-linux/MuseScoreNightly-armcross-…

and report back to me your system configuration and what works and what doesn't work. (If you can test ALSA, Pluse, and whatever else, that would be useful.

Note you will have to make that download executable, for example by typing:

chmod +x MuseScoreNightly-201603261315-armcross-9b68d75-armhf.AppImage

Also it would be useful if you can report back output of check-depends:

./MuseScoreNightly-201603261315-armcross-9b68d75-armhf.AppImage check-depends