Extension:Score/bn
The Score extension requires setting up an external service, Shellbox , to securely process musical scores via LilyPond. Please review the information in #Security concerns and the 2021 security advisory before installing this extension. |
Score মুক্তির অবস্থা: স্থিতিশীল |
|
---|---|
বাস্তবায়ন | ট্যাগ |
বিবরণ | Allows rendering of musical scores with LilyPond |
লেখক(গণ) | Alexander Klauer, Étienne Beaulé |
সর্বশেষ সংস্করণ | 0.3.0 (2019-03-23) |
MediaWiki | 1.36+ |
PHP | 5.3+ |
লাইসেন্স | গ্নু জেনারেল পাবলিক লাইসেন্স ৩.০ অথবা পরবর্তী |
ডাউনলোড | README.md |
|
|
score |
|
Quarterly downloads | 29 (Ranked 111st) |
Public wikis using | 918 (Ranked 265th) |
Translate the Score extension if it is available at translatewiki.net | |
Issues | Open tasks · বাগ প্রতিবেদন |
The Score extension allows the rendering of musical scores as PNG images using LilyPond and can also transform them into audio and MIDI files.
স্বীকৃতি
- The original Extension:LilyPond was written by Johannes E. Schindelin.
- This extension is based on a code review of Extension:LilyPond by Tim Starling.
- The original Extension:ABC was written by River Tarnell.
ব্যবহার
After setup, you can embed simple LilyPond notation into your wikitext inside a <score>...</score>
tag. For example:
<score>\relative c' { f d f a d f e d cis a cis e a g f e }</score>
yields:
You may also specify attributes to the score tags in the general form
<score attribute1="value1" attribute2="value2">…</score>.
উদাহরণ স্বরূপ:
<score sound="1">\relative c' { \set Staff.midiInstrument = "tenor sax" f d f a d f e d cis a cis e a g f e }</score>
yields:
The following attributes are available:
বৈশিষ্ট্য | Allowed values | Effect |
---|---|---|
lang | ABC, lilypond (default) | Sets the score language. For example, to provide a score in ABC notation, you might use: <score lang="ABC">
X:1
M:C
L:1/4
K:C
C, D, E, F,|G, A, B, C|D E F G|A B c d|
e f g a|b c' d' e'|f' g' a' b'|]
</score>
|
midi | (removed) This used to control whether the rendered score image linked to a MIDI file. | |
override_midi | Known file name, that is, if override_midi="name" is given, [[File:name]] does not yield a red link |
(deprecated) Instead you can add a [[File:superior midi filename.mid]] wikilink after the closing </score> tag.Uses the specified MIDI file instead of generating one with LilyPond. Use this attribute together with the midi attribute (see before) or the sound attribute (see later). This attribute is useful if you already have a MIDI file whose quality is superior to what would be generated by LilyPond. |
override_audio | Known file name, that is, if override_audio="name" is given, [[File:Name]] does not yield a red link |
(deprecated) Instead you can add a [[File:superior audio filename.oga]] wikilink after the closing </score> tag.Embeds the media specified by the file name in the HTML after the score image(s). This is an alternative to the sound attribute (see further). It can, for example, be useful if you have a suitable audio file of superior quality compared with the auto-generated audio file. Of course, you can still omit both attributes in this case and add the file manually to the page, if you prefer. |
override_ogg | (deprecated) Doubly-deprecated alias for override_audio. | |
raw | 0 (default), 1 | If set to 1, the score code is interpreted as a complete LilyPond file. Use this option if you want to create more complex scores. If the score language (lang attribute) is not set to lilypond, this attribute is ignored. By default (when raw=0), provided code is wrapped in a \score{...} block, along with default \layout{...} and \midi{...} blocks, if not already provided.
|
sound | 0 (default), 1 | If set to 1, an audio file will be generated for the score, provided you installed and configured এক্সটেনশন:টাইমডমিডিয়াহ্যান্ডেলার . An audio player will be embedded in the HTML after the score image(s). |
vorbis | 0 (default), 1 | (deprecated) Alias for sound. |
The LilyPond language
Lyrics may be added like this:
<score>
\relative c'' { \time 4/4 \key c \major
c4 g8 g a4 g r b^> c^> r \bar "|." }
\addlyrics { Shave and a hair -- cut: two bits. }
</score>
For advanced users, the \set Staff.midiInstrument
command can be used to change the MIDI instrument for the sound.
Prerequisites
The following packages are recommended:
- LilyPond
- Ghostscript
- ImageMagick
- FluidSynth
- Firejail
This extension uses LilyPond to render score images, so you need a working LilyPond installation (Special:Version displays the LilyPond version). If you install LilyPond from a package, Ghostscript will also be installed, since LilyPond depends on Ghostscript. ImageMagick should be installed to trim the images, otherwise they will contain an excessive amount of whitespace.
For security reasons, it is highly recommended to install firejail to further restrict what LilyPond and Ghostscript can do if untrusted users are allowed to edit your wiki.
The extension is also capable of creating audio files from the MIDI files generated by LilyPond. If you want to make use of this functionality, you need to have এক্সটেনশন:টাইমডমিডিয়াহ্যান্ডেলার installed.
FluidSynth is the preferred method to convert MIDI files to audio files, however TiMidity++ is also supported.
Security concerns
Score uses LilyPond in safe mode, however there are known unfixed safe mode escape vulnerabilities leading to arbitrary execution.
If you don't absolutely trust everyone who has editing privileges on your wiki, it is strongly recommended to set up containment of lilypond using Shellbox . See Shellbox#Server setup for details on how to set up the contained server, and below for configuring MediaWiki to use it. Also, ensure you're using a recent version of LilyPond (2.22.0+) or a distribution package (e.g. from Debian) that has security fixes. Keep safe mode enabled, even with containment as an extra layer of defense. Certain functionality will not work in safe mode, the fix for that is to modify LilyPond to allow that functionality in safe mode.
Installation
- See the extension's
README.md
for detailed installation instructions.
- ডাউনলোড করুন এবং আপনার
extensions/
ফোল্ডারেরScore
নামক ডিরেক্টরিতে ফাইল(গুলি) নিন।
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Score - আপনার LocalSettings.php -এর নিচের অংশে নিম্নলিখিত কোড যোগ করুন:
wfLoadExtension( 'Score' ); $wgScoreTrim = true; $wgImageMagickConvertCommand = '/usr/bin/convert'; $wgShellboxUrl = '... address to Shellbox ...'; $wgShellboxSecretKey = '... your secret key ...';
- Create a subdirectory named
lilypond
in your $wgUploadDirectory (usually the directory namedimages
in your MediaWiki directory). Make sure the directory is writable by your Web server. - করা হয়েছে – এক্সটেনশনটি সফলভাবে ইনস্টল করা হয়েছে কিনা তা যাচাই করতে আপনার উইকির Special:Version-এ যান।
Configuration
Here are some of the extension's global configuration parameters.
$wgScoreLilyPond
Set $wgScoreLilyPond
to the path to your LilyPond executable (typically /usr/bin/lilypond
or /usr/local/bin/lilypond
).
$wgScoreTrim
The $wgScoreTrim
is a boolean which defaults to the value of $wgUseImageMagick
. If true
, the resulting score PNG images are trimmed with ImageMagick. If you don't want trimming, or don't want to install ImageMagick, set $wgScoreTrim
to false
.
$wgScoreAbc2Ly
Set $wgScoreAbc2Ly
to the path of your ABC to LilyPond converter executable (typically /usr/bin/abc2ly
or /usr/local/bin/abc2ly
).
$wgScoreFluidsynth
Set $wgScoreFluidsynth
to the path of your Fluidsynth executable (typically /usr/bin/fluidsynth
or /usr/local/bin/fluidsynth
).
$wgScoreSoundfont
Set $wgScoreSoundfont
to the path of your soundfont file (typically /usr/share/sounds/sf2/FluidR3_GM.sf2
or /usr/share/sounds/sf2/FluidR3_GS.sf2
).
$wgScoreLame
Set $wgScoreLame
to the path of your Lame executable (typically /usr/bin/lame
or /usr/local/bin/lame
). Required if the generated audio file should be a MP3.
Remarks
This extension runs various binaries in a Shellbox to provide some security. You may have to increase $wgMaxShellMemory if you get "out of memory" errors.
Finding scores
Pages containing <score>
tags are in the tracking category with message name 'score-use-category'.
Visit Special:TrackingCategories to find the localized title of this category on your wiki and show the pages in it, for example w:Category:Pages using the Score extension on the English Wikipedia.
See also
- Help:Score on English Wikipedia and Help:Sheet music on Wikisource have more examples of LilyPond syntax.
এই এক্সটেনশন এক বা একাধিক উইকিমিডিয়া প্রকল্পসমূহ-এ ব্যবহৃত হচ্ছে। সম্ভবত এটির অর্থ হল এক্সটেনশন স্থিতিশীল এবং এই জাতীয় উচ্চ ট্রাফিক ওয়েবসাইটগুলি ব্যবহার করার জন্য যথেষ্ট ভাল কাজ করে। উইকিমিডিয়ার CommonSettings.php এবং InitialiseSettings.php কনফিগারেশন ফাইলগুলিতে এটি কোথায় ইনস্টল হয়েছে তা দেখতে এই এক্সটেনশনের নামটি সন্ধান করুন। নির্দিষ্ট উইকিতে ইনস্টল করা এক্সটেনশন-এর সম্পূর্ণ তালিকা উইকির Special:Version পৃষ্ঠাতে দেখা যাবে। |
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
- Stable extensions/bn
- Tag extensions/bn
- GPL licensed extensions/bn
- Extensions in Wikimedia version control/bn
- ParserFirstCallInit extensions/bn
- SoftwareInfo extensions/bn
- WikibaseClientDataTypes extensions/bn
- WikibaseRepoDataTypes extensions/bn
- All extensions/bn
- Extensions used on Wikimedia/bn
- Extensions included in Miraheze/bn
- Extensions included in WikiForge/bn
- Music editor extensions/bn
- Extensions with VisualEditor support/bn