命令行参数
MSCORE(1) —通用指令手册页面
主 语
mscore, MuseScore3 — MuseScore 3 乐谱编辑器
对 照 表
您可以通过键入以下命令行来启动MuseScore:
- mscore [参数] [文件名 …](Mac与Linux/BSD/Unix)
- musescore [参数] [文件名 …](Linux/BSD/Unix)
- MuseScore3.exe [参数] [文件名 …] (Windows)
[参数]以及[文件名]皆非必须的。要使其工作,MuseScore可执行文件必须在%路径%
(Windows)中,或是(Mac与Linux下)相应的$路径
。如果依旧不行,请参阅 恢复到工厂设置以获得在各种受支持平台上从命令行查找和执行MuseScore可执行文件的详细说明。
以下是详细对照表:
mscore [-deFfhIiLmnOPRstvw]
[-a | --use-audio driver]
[-b | --bitrate 比特率]
[-c | --config-folder pathname]
[-D | --monitor-resolution DPI]
[-E | --install-extension extension file]
[-j | --job file.json]
[-M | --midi-operations file]
[-o | --export-to file]
[-p | --plugin name]
[-r | --image-resolution DPI]
[-S | --style 样式]
[-T | --trim-image margin]
[-x | --gui-scaling factor]
[--debug]
[--diff]
[--dump-midi-in]
[--dump-midi-out]
[--experimental]
[--export-score-parts]
[--factory-settings]
[--force]
[--help]
[--layout-debug]
[--load-icons]
[--long-version]
[--new-score]
[--no-fallback-font]
[--no-midi]
[--no-synthesizer]
[--no-webview]
[--raw-diff]
[--revert-settings]
[--run-test-script]
[--score-media]
[--score-mp3]
[--score-parts-pdf]
[--template-mode]
[--test-mode]
[--version]
[file ...]
解 释
MuseScore 是一个免费、开源、所见即所得、跨平台、多语言的作曲与记谱软件,在GNU通用公共许可证(GPLv2)下发布。
运行mscore时不添加任何额外的参数将启动完整的MuseScore图形界面程序并打开命令行中指定的任何文件。
The options are as follows:
- -a | --use-audio driver
-
Use audio driver: one of jack, alsa, portaudio, pulse
- -b | --bitrate bitrate
-
设定MP3输出码率(kbit/s)
- -c | --config-folder pathname
-
覆盖配置和设置目录
- -D | --monitor-resolution DPI
-
指定监视器分辨率(覆盖自动检测)
- -d | --debug
-
在调试模式下启动MuseScore
- -E | --install-extension extension file
-
安装一个扩展功能;除非还指定了-e,否则默认情况下加载soundfonts
- -e | --experimental
-
启用试验性特性,比如 图层
- -F | --factory-settings
-
Use only the standard built-in presets (“factory settings”) and delete user preferences; compare with the -R option (see also Revert to factory settings)
- -f | --force
-
忽略“转换器模式”中的乐谱损坏和版本不匹配警告
- -h | --help
-
显示调用指令的概述(不适用于Windows)
-I | --dump-midi-in -
在控制台显示所有MIDI输入
- -i | --load-icons
-
从文件系统加载图标;如果您想编辑MuseScore图标并预览更改,这非常有用
- -j | --job file.json
-
处理一个转换作业(参阅下文的例 子)
- -L | --layout-debug
-
以输出调试模式启动MuseScore
- -M | --midi-operations file
-
指定MIDI导入操作文件(参阅 例 子 below)
- -m | --no-midi
-
禁用MIDI输入
- -n | --new-score
-
无论在用户首选项中是启用还是禁用,都要从New Score向导开启
- -O | --dump-midi-out
-
在控制台显示所有MIDI输出
- -o | --export-to file
-
将给定的(或当前打开的)文件导出为指定的输出文件。导出文件的类型取决于其文件名的扩展。此选项切换到“转换器模式”,并避免图形用户界面。
- -P | --export-score-parts
-
当使用-o参数转换为PDF时,将每个分谱的页面附加到创建的PDF文件中。若曲谱无分谱时,所有默认分谱将临时自动生成。
- -p | --plugin name
-
执行指定的插件
- -R | --revert-settings
-
只使用标准的内置预置(“出厂设置”),但不删除用户的首选项;与-F选项形成对比
- -r | --image-resolution DPI
-
设定转换的PNG图像分辨率。默认为300 DPI(实际上,是参数设置的导出选项卡中PNG选项组的“分辨率”的值。)
- -S | --style style
-
首先加载一份样式文件;与-o参数搭配使用非常有用
- -s | --no-synthesizer
-
禁用集成的软件合成器
- -T | --trim-image margin
-
Trim exported PNG and SVG images to remove whitespace surrounding the score. The specified margin, in pixels, will be retained (use
0
for a tightly cropped image). When exporting to SVG, this option only works with single-page scores. - -t | --test-mode
-
为所有文件设置测试模式标志
- -v | --version
-
在不启动图形用户界面的情况下显示应用程序的名称和版本(不适用于Windows)
- -w | --no-webview
-
在启动中心禁用web视图组件
- -x | --gui-scaling factor
-
将乐谱显示和其他GUI元素按指定的因数比例缩放;用于高分辨率显示器
- --diff
-
印出给定乐谱之间的条件差异
- --long-version
-
在不启动图形用户界面的情况下显示应用程序的完整名称、版本和git修订版本(在Windows上无法工作)
- --no-fallback-font
-
不使用Bravura作为备份音乐字体
- --raw-diff
-
印出给定乐谱之间的原始数据差异
- --run-test-script
-
运行命令行参数中列出的脚本测试
- --score-media
-
将给定乐谱的的除MP3的所有媒体作为单个JSON文档导出到stdout
- --score-mp3
-
为给定的乐谱生成MP3并将其作为单个JSON文档导出到stdout
- --score-parts-pdf
-
为给定的乐谱生成分谱数据,并将其作为单个JSON文档导出到stdout
- --template-mode
-
以模板模式保存文件(例:无页面尺寸)
MuseScore also supports the automatic Qt command line options.
批处理转换作业JSON格式
The argument to the -j option must be the pathname of a file comprised of a valid JSON document honoring the following specification:
-
顶级元素必须是一个JSONArray,它可以是空的。
-
每个数组元素必须是一个JSONObject,具有以下键:
in
:值是输入文件的名称(要转换的乐谱),即JSONString。plugin
:值是插件的文件名(带有.qml
扩展)。它将从全局或用户个人的插件路径中读取,并在转换输出发生之前作为JSONString执行。可选填,但必须至少有一个plugin
和out
。out
: 值为转换输出目标,如下文定义。可选填,但必须至少有一个plugin
和out
。
-
转换输出目标可以是文件名(带扩展名,它决定了要转换的格式),如JSONString。
-
The conversion output target may be a JSONArray of filenames as JSONString, as above, which will cause the score to be written to multiple output files (in multiple output formats) sequentially, without being closed, re-opened and re-processed in between.
-
If the conversion output target is a JSONArray, one or more of its elements may also be, each, a JSONArray of two JSONStrings (called first and second half in the following description). This will cause part extraction: for each such two-tuple, all extant parts of the score will be saved individually, with filenames being composed by concatenating the first half, the name (title) of the part, and the second half. The resulting string must be a valid filename (with extension, determining the output format). If a score has no parts (excerpts) defined, this will be silently ignored without error.
-
以下是有效的输出文件扩展后缀:
flac
- __F__ree __L__ossless __A__udio __C__odec 免费无损音频编译器(压缩音频)
metajson
- 各种乐谱元数据(JSON)
mid
- 标准MIDI文件
mlog
- 内部文件完整性检查日志 (JSON)
mp3
- MPEG Layer III(有损压缩音频)
mpos
- __m__easure __pos__itions 小节位置 (XML)
mscx
- 未经压缩的MuseScore文件
mscz
- 压缩的MuseScore文件
musicxml
- 未经压缩的MusicXML文件
mxl
- 压缩的MusicXML文件
ogg
- OGG Vorbis(有损压缩音频)
pdf
- __p__ortable __d__ocument __f__ile便携式档案文件(用于印刷)
png
- portable network graphics (image) — Individual files, one per score page, with a hyphen-minus followed by the page number placed before the file extension, will be generated.
spos
- __s__egment __pos__itions区段位置(XML)
svg
- __s__calable __v__ector __g__raphics ()
wav
- RIFF波形文件(未压缩音频)
xml
- 未压缩的MusicXML文件
请参阅下文示例。
环 境
SKIP_LIBJACK
- 设定此项(其值不重要)已跳过 JACK Audio Connection Kit library的初始化,以防其引发问题。
XDG_CONFIG_HOME
- 用户配置位置;未设定情况下默认为
~/.config
XDG_DATA_HOME
- 用户数据位置;未设定情况下默认为
~/.local/share
请注意MuseScore同样支持普通的Qt环境变量,例如QT_QPA_GENERIC_PLUGINS
、QT_QPA_PLATFORM
、QT_QPA_PLATFORMTHEME
、QT_QPA_PLATFORM_PLUGIN_PATH
、QT_STYLE_OVERRIDE
、DISPLAY
等等。
文 件
/usr/share/mscore-3.0/
包含应用程序支持数据(演示文件、乐器、本地化翻译、全局插件、音色库、样式、和弦、模版以及墙纸)。在Debian包中,全局soundfonts被安装于/usr/share/sounds/sf2/
, /usr/share/sounds/sf3/
或者相应的/usr/share/sounds/sfz/
中。
用户个人数据(扩展功能、插件、音色、样式、模版)以及文件(图像、乐谱)通常安装在~/MuseScore3/
下的子目录中,也可在配置中变更。请注意,快照、alpha内测以及beta公测版本使用的目录名称为MuseScore3Development
而非MuseScore3
。
$XDG_CONFIG_HOME/MuseScore/MuseScore3.ini
包含了用户偏好设置、最近文件列表及其位置、窗口大小与位置等等。请参阅上文的开发版本路径。
$XDG_DATA_HOME/data/MuseScore/MuseScore3/
包含程序下载的已升级的本地化翻译文件插件信息、缓存乐谱、musescore.com社区网站的登陆凭证、会话信息、合成器设置、自定义调号与拍号以及快捷键。请参阅上面的开发版本路径。
范 例
使用命令行将乐谱转换为PDF
mscore -o '我的乐谱.pdf' '我的乐谱.mscz'
运行转换多个文档的批处理作业
mscore -j job.json
在当前作业目录里需要job.json
文件,以获得类似于下列的内容:
[
{
"in": "Reunion.mscz",
"out": "Reunion-coloured.pdf",
"plugin": "colornotes.qml"
},
{
"in": "Reunion.mscz",
"out": [
"Reunion.pdf",
[ "Reunion (part for ", ").pdf" ],
"Reunion.musicxml",
"Reunion.mid"
]
},
{
"in": "Piece with excerpts.mscz",
"out": [
"Piece with excerpts (Partitura).pdf",
[ "Piece with excerpts (part for ", ").pdf" ],
"Piece with excerpts.mid"
]
}
]
The last part of the job would, for example, cause files like “Piece with excerpts (part for Violin).pdf
” to be generated alongside the conductor’s partitura and a MIDI file with the full orchestra sound, whereas the equivalent part of the Reunion conversion will be silently ignored (because the Reunion piece (a MuseScore demo) has no excerpts defined).
MIDI导入操作
The attached midi_import_options.xml
is a sample MIDI import operations file for the -M option.
诊 断
The mscore utility exits 0 on success, and >0 if an error occurs.
另 见
fluidsynth(1), midicsv(1), timidity(1), qtoptions(7)
- https://musescore.org/handbook
-
在线使用手册,完整的用户手册
- https://musescore.org/forum
-
缪斯论坛
- https://musescore.org/node/278582
-
恢复出厂设置(故障排除)
- https://musescore.org/project/issues
-
Project Issue Tracker — Please check first to if the bug you’re encountering has already been reported. If you just need help with something, then please use the support forum instead.
- http://doc.qt.io/qt-5/qguiapplication.html#supported-command-line-optio…
-
自动化Qt命令行选项的文档
标 准
MuseScore试图实现以下标准:
- MusicXML 3.1(乐谱转换格式)
- SF2(SoundFont 2.01)
- SF3(OGG Vorbis压缩样本的SoundFont音色)
- SFZ(Sforzato soundfont)
- SMuFL(Standard Music Font Layout - 标准音乐字体输出 1.20)
历 史
MuseScore在2002年从MusE音序器中分离出来,从此成为最重要的开源曲谱软件。
作 者
MuseScore由Werner Schweer及众人开发。
本手册由mirabilos <tg@debian.org>撰写。
CAVEATS
The automatic Qt command line options are removed from the argument vector before the application has a chance at option processing; this means that an invocation like mscore -S -reverse
has no chance at working because the -reverse
is removed by Qt first.
漏 洞
-
MuseScore不支持/etc/papersize。
-
存在更多问题——查看项目的问题反馈(参阅 SEE ALSO)。
MuseScore ——二〇一八年十二月十八日