Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add guzheng #26059

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions share/instruments/instruments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@
<Family id="bouzoukis">
<name>Bouzoukis</name>
</Family>
<Family id="guzhengs">
<name>Guzhengs</name>
</Family>
<Family id="kotos">
<name>Kotos</name>
</Family>
Expand Down Expand Up @@ -13545,6 +13548,24 @@
</Channel>
<genre>world</genre>
</Instrument>
<Instrument id="guzheng">
<family>guzhengs</family>
<trackName>Guzheng</trackName>
<longName>Guzheng</longName>
<shortName>Gz.</shortName>
<description>Chinese plucked half-tube zither.</description>
<musicXMLid>pluck.guzhen</musicXMLid>
<clef>G</clef>
<barlineSpan>1</barlineSpan>
<aPitchRange>38-86</aPitchRange>
<pPitchRange>38-86</pPitchRange>
<singleNoteDynamics>0</singleNoteDynamics>
<Channel>
<!--MIDI: Bank 0, Prog 107; MS General: Koto-->
<program value="107"/> <!--Koto-->
</Channel>
<genre>world</genre>
</Instrument>
<Instrument id="koto">
<family>kotos</family>
<trackName>Koto</trackName>
Expand Down
9 changes: 9 additions & 0 deletions share/instruments/instrumentsxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -5815,6 +5815,15 @@ QT_TRANSLATE_NOOP3("engraving/instruments", "Bou.", "bouzouki-4-course shortName
//: traitName for Bouzouki; course: 4-course; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names
QT_TRANSLATE_NOOP3("engraving/instruments", "4-course", "bouzouki-4-course traitName"),

//: description for Guzheng; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names
QT_TRANSLATE_NOOP3("engraving/instruments", "Chinese plucked half-tube zither.", "guzheng description"),
//: trackName for Guzheng; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names
QT_TRANSLATE_NOOP3("engraving/instruments", "Guzheng", "guzheng trackName"),
//: longName for Guzheng; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names
QT_TRANSLATE_NOOP3("engraving/instruments", "Guzheng", "guzheng longName"),
//: shortName for Guzheng; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names
QT_TRANSLATE_NOOP3("engraving/instruments", "Gz.", "guzheng shortName"),

//: description for Koto; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names
QT_TRANSLATE_NOOP3("engraving/instruments", "Japanese plucked half-tube zither.", "koto description"),
//: trackName for Koto; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names
Expand Down
6 changes: 4 additions & 2 deletions src/engraving/playback/mapping/stringssetupdataresolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,16 @@ PlaybackSetupData StringsSetupDataResolver::doResolve(const Instrument* instrume
{ "balalaika-secunda", { SoundId::Balalaika, SoundCategory::Strings, { SoundSubCategory::Secunda,
SoundSubCategory::Plucked } } },

{ "guzheng", { SoundId::Guzheng, SoundCategory::Strings, { SoundSubCategory::Chinese,
SoundSubCategory::Plucked } } },
{ "koto", { SoundId::Koto, SoundCategory::Strings, { SoundSubCategory::Japanese,
SoundSubCategory::Plucked } } },
{ "oud", { SoundId::Oud, SoundCategory::Strings, { SoundSubCategory::African,
SoundSubCategory::Plucked } } },
{ "shamisen", { SoundId::Shamisen, SoundCategory::Strings, { SoundSubCategory::Japanese,
SoundSubCategory::Plucked } } },
{ "sitar", { SoundId::Sitar, SoundCategory::Strings, { SoundSubCategory::Indian,
SoundSubCategory::Plucked } } },
{ "oud", { SoundId::Oud, SoundCategory::Strings, { SoundSubCategory::African,
SoundSubCategory::Plucked } } },
{ "prim", { SoundId::Prim, SoundCategory::Strings, { SoundSubCategory::Plucked, } } },
{ "brac", { SoundId::Brac, SoundCategory::Strings, { SoundSubCategory::Plucked } } },
{ "bugarija", { SoundId::Bugarija, SoundCategory::Strings, { mpe::SoundSubCategory::Plucked } } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,11 @@ static const auto& mappingByCategory(const mpe::SoundCategory category)
{ { mpe::SoundId::Balalaika, { mpe::SoundSubCategory::Secunda,
mpe::SoundSubCategory::Plucked, } }, { midi::Program(8, 107) } },

{ { mpe::SoundId::Guzheng, { mpe::SoundSubCategory::Chinese, mpe::SoundSubCategory::Plucked } }, { midi::Program(8, 107) } },
{ { mpe::SoundId::Koto, { mpe::SoundSubCategory::Japanese, mpe::SoundSubCategory::Plucked } }, { midi::Program(8, 107) } },
{ { mpe::SoundId::Oud, { mpe::SoundSubCategory::African, mpe::SoundSubCategory::Plucked } }, { midi::Program(8, 25) } },
{ { mpe::SoundId::Shamisen, { mpe::SoundSubCategory::Japanese, mpe::SoundSubCategory::Plucked } }, { midi::Program(0, 106) } },
{ { mpe::SoundId::Sitar, { mpe::SoundSubCategory::Indian, mpe::SoundSubCategory::Plucked } }, { midi::Program(0, 104) } },
{ { mpe::SoundId::Oud, { mpe::SoundSubCategory::African, mpe::SoundSubCategory::Plucked } }, { midi::Program(8, 25) } },
{ { mpe::SoundId::Prim, { mpe::SoundSubCategory::Plucked, } }, { midi::Program(0, 24) } },
{ { mpe::SoundId::Brac, { mpe::SoundSubCategory::Plucked } }, { midi::Program(0, 24) } },
{ { mpe::SoundId::Bugarija, { mpe::SoundSubCategory::Plucked } }, { midi::Program(0, 24) } },
Expand Down
2 changes: 2 additions & 0 deletions src/framework/mpe/soundid.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum class SoundId
Theorbo,
Archlute,
Balalaika,
Guzheng,
Koto,
Oud,
Shamisen,
Expand Down Expand Up @@ -434,6 +435,7 @@ inline const std::unordered_map<SoundId, String> ID_STRINGS
{ SoundId::Theorbo, String(u"theorbo") },
{ SoundId::Archlute, String(u"archlute") },
{ SoundId::Balalaika, String(u"balalaika") },
{ SoundId::Guzheng, String(u"ghuzheng") },
{ SoundId::Koto, String(u"koto") },
{ SoundId::Oud, String(u"oud") },
{ SoundId::Shamisen, String(u"shamisen") },
Expand Down