Total Pageviews

5,442,930

Sunday, 21 May 2023

音乐制谱软件MuseScore



MuseScore是一款开源免费的作曲与乐谱软件, 拥有多语言版本(包括中文), 编辑创建的乐谱所见即所得,是替换专业的商业制谱软件如Sibelius和Finale的开源解决方案。制作完乐谱后, 用户可以打印出漂亮排版的乐谱, 或保存为 PDF 和 MIDI 文件。目前支持多操作系统,包括:Window, Mac OS 以及Linux, 遵守GPL v 2.0开源协议。

[repo owner=”musescore” name=”MuseScore”]

----------------------------------------------------------------

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!

musescore.org 

Music notation and composition software

License: GPL v3

MuseScore is an open source and free music notation software. For support, contribution, and bug reports visit MuseScore.org. Fork and make pull requests!

Features

  • WYSIWYG design, notes are entered on a "virtual notepaper"
  • TrueType font(s) for printing & display allows for high quality scaling to all sizes
  • Easy & fast note entry
  • Many editing functions
  • MusicXML import/export
  • MIDI (SMF) import/export
  • MuseData import
  • MIDI input for note entry
  • Integrated sequencer and software synthesizer to play the score
  • Print or create pdf files

More info

License

MuseScore is licensed under GPL version 3.0. See LICENSE.GPL in the same directory.

Packages

See Code Structure on Wiki

Building

Read the Compilation section of the MuseScore Wiki for a complete build walkthrough and a list of dependencies.

Getting sources

If using git to download repo of entire code history, type:

git clone https://github.com/musescore/MuseScore.git
cd MuseScore

Otherwise, you can just download the latest source release tarball from the Releases page, and then from your download directory type:

tar xzf MuseScore-x.x.x.tar.gz
cd MuseScore-x.x.x

Release Build

To compile MuseScore for release, type:

cmake -P build.cmake -DCMAKE_BUILD_TYPE=Release

If something goes wrong, append the word "clean" to the above command to delete the build subdirectory:

cmake -P build.cmake -DCMAKE_BUILD_TYPE=Release clean

Then try running the first command again.

Running

To start MuseScore, type:

cmake -P build.cmake -DCMAKE_BUILD_TYPE=Release run

Or run the compiled executable directly.

Debug Build

A debug version can be built and run by replacing -DCMAKE_BUILD_TYPE=Release with -DCMAKE_BUILD_TYPE=Debug in the above commands.

If you omit the -DCMAKE_BUILD_TYPE option entirely then RelWithDebInfo is used by default, as it provides a useful compromise between Release and Debug.

Testing

See mtest/README.md or the developer handbook for instructions on how to run the test suite.

The new script testing facility is also available to create your own automated tests. Please try it out!

Code Formatting

Run ./hooks/install.sh to install a pre-commit hook that will format your staged files. Requires that you install uncrustify.

If you have problems, please report them. To uninstall, run ./hooks/uninstall.sh.

from https://github.com/musescore/MuseScore

 ---------------------------------------------------------

Set up developer environment

Summary

  1. Running the commands in this guide
  2. Install a package manager
  3. Install CMake and Git
  4. Set up advanced developer environment (optional)

Running the commands in this guide

We recommend building on the Intel/AMD 64-bit (x86_64) architecture, but we do support Compiling on Macs with Apple Silicon.

Other architectures should work but Qt does not provide binaries for them so you'll need to compile Qt yourself or install it from a third party (e.g. your Linux distribution).

Linux and macOS

Use your terminal of choice. The built-in Terminal application is fine.

Windows

Use PowerShell to start with. Later, after you've installed Git, consider using Git Bash instead of PowerShell (see Set up advanced developer environment (optional) below).

CMD (Command Prompt) will usually work but some commands require a slightly different syntax.

Please do not use WSL or WSL2 (Windows Subsystem for Linux) as compiling in that environment would create Linux binaries rather than Windows executables.

Install a package manager

Having a package manager enables you to install software quickly via the command line.

Linux

Congratulations, you already have a package manager! Use the following command to find out what it is called:

which apt yum dnf pacman emerge zypper | xargs -n1 basename

macOS

Please install one of these package managers:

Windows

Please install one of these package managers:

  • Chocolatey (choco) - recommended for most users
  • Scoop (scoop) - recommended for users who lack administrator privileges (but you'll need an admin to install it for you)

If you picked Chocolatey, it is recommended that you install gsudo (sudo) to enable the choco command to be used from within non-Admin prompts:

# Once from an Administrator prompt:
choco install gsudo

# In future, from non-Admin prompts:
sudo choco install [program]  # spawns UAC dialog to request permission

Scoop can be used from non-Admin prompts by default, but you might want to install gsudo anyway for use with other commands that require administrator privileges.

scoop install gsudo

Install CMake and Git

Use the command(s) corresponding to your package manager.

macOS

brew install cmake git
sudo port install cmake git

Windows

# Chocolatey (Admin prompt or sudo required)
choco install cmake --installargs ADD_CMAKE_TO_PATH=System
choco install git

# others
scoop install cmake git

Linux

sudo apt install cmake git
sudo dnf install cmake git
sudo pacman -S cmake git

Older distributions may not provide a recent enough version of CMake. Check near the top of MuseScore's CMakeLists.txt for the minimum required version, then run:

cmake --version

If your distribution's version of CMake is too old, try installing it via Python's package manager pip instead. Make sure you remove the distribution version first.

# Remove outdated distribution CMake
sudo apt remove --purge cmake
sudo dnf erase cmake

# Install pip for your distribution
sudo apt install python3-pip
sudo dnf install python3-pip

# Install latest CMake from pip
pip3 install wheel setuptools # need these first to install binary packages like CMake
pip3 install cmake

The CMake PyPI package (the one installed via pip) is an official method of installing CMake as documented on the CMake downloads page. However, distribution maintainers may be forced to use their distribution's CMake when building a MuseScore package, so the existence of the PyPI CMake is not a valid reason to update our minimum required version prematurely (but there may be other reasons for doing so that are valid).

Further dependencies for Linux

You might need to install libasound2-dev on your system in order to build MuseScore on a Linux system. Use for example:

sudo apt-get install libasound2-dev

Set up advanced developer environment (optional)

This section is not required to compile and run MuseScore. However, it may be required if you want to run scripts in the repository that are supplementary to the build, such as scripts to generate assets, templates, translations, or other resources. It will also give you a much nicer experience on the command line!

All platforms

On all platforms, if you need to install a Python program or module (e.g. requests), use your regular package manager to install Python's own package manager pip, then use pip to install the program/module. Don't use your regular package manager to install the program/module because it may not give you the latest version, and this method of installation won't be tested as thoroughly as via pip.

# Don't do this:
sudo apt install python3-requests  # installs outdated version

# Do this instead:
sudo apt install python3-pip
pip3 install requests  # notice no 'sudo' and pip name ends with '3' to distinguish from the Python 2 version

Do the same in other languages that have package managers, such as Rust (cargo), Node (npm), and Ruby (gem).

Linux

Congratulations, you already have an advanced developer environment!

macOS

For licensing reasons, macOS only provides Bash version 3 by default. Version 3 is ancient, so use these commands to install a more recent version:

brew install bash  # install newer Bash
which bash | sudo tee -a /etc/shells  # allow it to run as login shell in Terminal
chsh -s "$(which bash)"  # optional: use it as your default login shell in Terminal

When writing shell scripts for macOS, it's a good idea to make the script check the Bash version before doing anything else.

#!/usr/bin/env bash

((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }

# Commands from this point onwards can safely use modern Bash syntax

As well as an outdated Bash, macOS also uses the BSD variants of the standard Unix tools (ls, find, grep, sed, etc.) rather than the more popular GNU variants used by Linux and Git Bash. The BSD and GNU variants are very similar, but syntax and features do vary slightly between them, so you should bear this in mind if you need to write shell scripts that are portable across platforms. It is possible to install the GNU variants of Unix tools on macOS but it is probably best to not do this because you'll end up writing shell scripts that won't work properly without them.

Windows

Now that you have installed Git, you also have access to Git Bash. This is a full Bash shell plus a core set of familiar Unix tools (ls, find, grep, sed, etc.) all compiled to work natively on Windows. Unless stated otherwise, Git Bash can be used for all subsequent commands instead of PowerShell or CMD.

You can access Git Bash from the Start Menu and it will launch inside MinTTY, but we recommend using it inside Windows Terminal instead. Windows Terminal is installed by default in Windows 11. Windows 10 users can install for free it from the Microsoft Store.

Launch Windows Terminal and open its Settings. Add a new profile with the following information:

  • Name: Bash
  • Starting directory: %USERPROFILE%

And if you installed Git via Chocolatey or the EXE installer:

  • Command line: "%ProgramFiles%\Git\bin\bash.exe" -i
  • Icon: %ProgramFiles%\Git\mingw64\share\git\git-for-windows.ico

Or if you installed Git via Scoop:

  • Command line: "%UserProfile%\scoop\apps\git\current\usr\bin\bash.exe" -i
  • Icon: %UserProfile%\scoop\apps\git\current\mingw64\share\git\git-for-windows.ico

Git Bash will now appear in the dropdown list of profiles within Windows Terminal. You can optionally make it the default profile via Windows Terminal's Settings > Startup.

from https://github.com/musescore/MuseScore/wiki/Set-up-developer-environment

 

 

 

 

 

No comments:

Post a Comment