techknack.cognizor.com Welcome

Created Tuesday 02 December 2014

Notes on Technical aspects of computing projects are occasionally posted here. Focus is opensource, linux, and python usage methods, from Cognizor.

MuseScore, for music editing, composing and arranging

MuseScore (see musescore.org) is a great professional-level program for music editing, composing, and arranging. — MuseScore includes MIDI, audition and printout for players. It's opensource (C) and cross-platform.

In Debian linux MuseScore updating from v. 1.3 to 2.0 (beta)

To update the program MuseScore from long-standard version 1.3 to 2.0 which is now in beta,
the sourcecode was downloaded from https://github.com/musescore/MuseScore/archive/2.0beta1.zip (via
http://musescore.org/en/node/30866) and compiled into a binary that works well in debian linux.

With the environment built up as shown, current 32bit musescore nightly from http://prereleases.musescore.org/linux/nightly/ works immediately! :D New interface, cool template displays window.

http://prereleases.musescore.org/linux/nightly/mscore.32bits-2014-12-02-15-39-7ed6b11.tar.bz2

The built up debian OS based on kernel 3.16 for running musescore2.0.0b1 compiled inhouse has proven stable in over a month's use.
http://prereleases.musescore.org/linux/nightly/mscore.64bits-2014-12-02-15-36-7ed6b11.tar.bz2
The binary version posted here has worked fine in a month of testing. (Other pre-compiled versions found had not panned out.) Hope these notes help, and any errors are minimal!

If someone can use this information to build a proper debian package, great!

If someone can use this information to build a proper debian package, great!
(See discussion of ubuntu and debian releases on musescore.org pointing out the advantages of an a priori debian package.)

64bit nightly NOT working, though, doesn't see libvorbisfile.so.3 As for the current 64bit nightly ( mscore.64bits-2014-12-02-15-36-7ed6b11.tar.bz2 ), I am stuck. it won't open in either the 32bit system or booted specifically with root=vmlinuz-3.16.3-64 . It complains that it can't find a component of libvorbis (for ogg soundfiles). Where is it looking? The file, libvorbisfile.so.3 , is present in the form of a symbolic link to /usr/lib/i386-linux-gnu/libvorbisfile.so.3.3.4 which has come from an extant installation of package libvorbisfile3. Putting the link or the file itself into /usr/bin does not help any more than adding /usr/lib/i386-linux-gnu to $PATH.
Would a /usr/share/mscore directory containing it help?

knoppix@Microknoppix:/media/mmcblk0p1/mscore2_64bit$ ll
total 405120
-rwxrwxrwx 1 knoppix knoppix 298400969 Dec 2 09:44 mscore
-rwxrwxrwx 1 knoppix knoppix 116385693 Dec 3 17:46 mscore.64bits-2014-12-02-15-36-7ed6b11.tar.bz2

knoppix@Microknoppix:/media/mmcblk0p1/mscore2_64bit$ ./mscore
./mscore: error while loading shared libraries: libvorbisfile.so.3: cannot open shared object file: No such file or directory

In sum,

  1. For a workable up-to-date debian, knoppix 7.4.2 was selected for its convenient user interface and recent-version components.

  1. A long series of pre-requisites has to be added to the Operating System to provide code dependencies for the new musescore. The packages were drawn from standard debian.org archives (using apt-get methods, either Synaptic GUI or commandline, which easily permits message capture useful for debugging). This substrate enhances the operating system's (1) C-code compiler facilities, (2) sound, and (3) graphic user interface widgetry. Lots of the many modifications are to accommodate Qt5.3 for widgetry (GUI).

The commands are listed in the next section, q.v. Our starting point for debian was the ubuntu pre-req list found at http://musescore.org/en/developers-handbook/compilation/compile-instructions-ubuntu-14.10-git Fortunately, when ubuntu takes up the debian code the package names are apparently left unchanged.
A diff of the original and the mscore2 OS components reports 69 (93-24) package-change lines!

  1. You download the [beta] sourcecode from the musescore developers archive, and move into the directory tree produced thereby.
git clone git://github.com/musescore/MuseScore.git
cd MuseScore

  1. Next, apply the standard gnu C compiler (gcc 4.7) to build the binary parts. First, sitting at the top level of the MuseScore directory that results from the download you let the compiler note the locations of whatall it needs with the command './configure' (That's bash shell syntax; some other commandline shells don't need the ./ part, which means "look right here in this directory".)
./configure

  1. Then you invoke 'make' to build up the parts to go into the binary. (If you end up re-doing things, look into 'make clean' and 'make revision'; see the ubuntu reference.)
(After the build on top of the dependencies, if you run './mscore' from the build part of the MuseScore tree, it should run.)
make

  1. Next you 'make install' which by default puts the composite binary into /usr/local/bin . The composite is now a single file, called mscore (or maybe mscore2). You have to be sitting in the MuseScore directory to get everything found and pieced together right.
(/usr/local/bin is like /usr/bin and /usr/sbin for putting binaries basic to the operating system into, but it's used for locally added binaries. These being looked thru because they're on the system $PATH list, executable programs get found. For writing to that directory, you'll need to have root (superuser) permissions. You can edit the musescore files to change the place the binary is put if you need to.)
make install

  1. To run your binary, you call it up. 'mscore' (or maybe mscore2) opens the MuseScore GUI. Ah, beautiful!
(The Main Menu MuseScore entry can handle this for you. Safer to put /usr/local/bin/mscore or mscore2 as the command, really.)
mscore or mscore2

Commands to add programs mscore2 needs

Note that the dependency installs into debian differ from those cited for the debian derivative ubuntu at http://musescore.org/en/developers-handbook/compilation/compile-instructions-ubuntu-14.10-git Fortunately, the ubuntu packages largely keep the same names as the debian versions they are made from.

In debian it is simpler to become root at the beginning of the process of adding the dependency programs into the system than to be using a substitute user 'sudo'. The ubuntu instructions cited above list multiple packages per command, but one install at a time as shown below is safer for seeing snags the first time you compile.

There are LOTS of changes of the contents of the OS to get these dependencies in place. Tons of additions come along with Qt5.3. However, the resulting OS seems to be stable (well over a month of use, heavy on the MuseScore). These files detail the changes in the operating system: +OS changes for mscore2b1 in debian

Basics for compiling the binary from C sourcecode

Become superuser:

Commandline (with prompt):
your computer, ordinary user$ su
Password: [superuser password]
Get the utility to download the sourcecode.
your computer, superuser# apt-get install git
Notes: The knoppix debian distro already has the git package,

The rest of the packages that mscore needs are also all put in by superuser, with prompt ending in # .
Quick tip: To repeat a command, press the up-arrow. You can edit it to put the new package name.
(Original instructions for these basics in ubuntu said sudo apt-get install git cmake g++ )

apt-get install cmake

Notes: This responds to the usual commandline make but has hidden features used in the mscore, as seen in CMakeLists.txt within the MuseScore2.0.0b1 code.
apt-get install g++
Notes: knoppix 7.4.2 version of the compiler, g++, is 4.9.1-1, which worked fine.

Audio

(Original ubuntu for this section was
sudo apt-get install libasound2-dev portaudio19-dev libmp3lame-dev libsndfile1-dev )

apt-get install libasound2-dev

Notes: libasound2-dev conflicts with extant binary libasound.so.2.0.0. So separately acquire libasound-dev-1.0.28-1_i386.deb or libasound-dev-1.0.28-1_amd64.deb by downloading it from debian.org and install it into the OS from the directory it sits in with the likes of
dpkg -i libasound-dev-1.0.28-1_i386.deb .
apt-get install libasound2-dev

apt-get install portaudio19-dev
apt-get install libmp3lame-dev
apt-get libflac-dev=1.3.0-2

Notes: pre-req of libsndfile1-dev, not mentioned in the ubuntu notes. (My notes are a bit fuzzy on this step, so double-check.)
apt-get install libsndfile1-dev

Widgets, very recent Qt

These installs wreak MANY CHANGES in the system. They bring in lots of other things, remove things, etc. The dependency chain differs from what is cited for ubuntu.

apt-get install libqt4-dev

Notes: already present in knoppix 7.4.2

apt-get install libxcb-keysyms1=0.4.0-1

Notes: not mentioned in the ubuntu notes.
apt-get install libjpeg62=1:1.3.1-3
Notes: not mentioned in the ubuntu notes.
apt-get install libqt5gui5=5.3.2+dfsg-4
Notes: not mentioned in the ubuntu notes.

apt-get install qtbase5-dev
apt-get install qttools5-dev
apt-get install qttools-dev-tools
apt-get install qtquick1-5-dev

apt-get install qtscript5-dev 
apt-get install libqt5xmlpatterns5-dev 
apt-get install libqt5svg5-dev 

apt-get install libqt5webkit5-dev
apt-get install libssl-dev
Options

"If you want to use the sound server PulseAudio,"

apt-get install libpulse-dev

Notes: Install of this is not dependent on the Qt stuff, so it could be done earlier.

Use with élan!

You can call up mscore2 from an icon menu entry: Knoppix Main Menu > Sound & Video > MuseScore
Equivalently, you can run it from a terminal so as to see its messages there:

cptr user$ /usr/local/bin mscore
or when mscore and/or mscore2 is on $PATH, just
$ mscore

Voilá. Connections to the net are built in, MIDI IN and sound out work, scores and parts print beautifully, export pdfs, take snippet graphics for embedding, select from or even change sound files, and use that music xml in/out and abc import too! You can edit your Tool symbol Palettes, change your footers and headers, read documentation (What?!).
MuseScore is very good at bringing your windows back up intact! (The backup file is clearly listed, starts with a comma, and there is a buffer besides.)