musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.38k stars 2.68k forks source link

Instrument request: timple canario. #22760

Open fefal64 opened 6 months ago

fefal64 commented 6 months ago

Your idea

Just add "timple-canario" to the MuseScore Instrument Definitions sheet with the following parameters (based on cavaquinho):

id: timple-canario
description: Small Spanish 5-string guitar (staff notation).
group: plucked-strings
family: guitars
order: 0
trackName: Timple Canario
longName: Timple Canario
shortName: Timp.
minP sound: E4
minA sound: E4
maxA sound: D6
maxP sound: G#6
minP: 64
minA: 64
maxA: 86
maxP: 92
musicXMLid: pluck.guitar
clefs: G
barlineSpans: 1
SND: 0
frets: 18
stringsFretted: 67;72;64;69;74
genres: world

And also for tablature:

id: timple-canario-tablature
description: Small Spanish 5-string guitar (tablature).
group: plucked-strings
family: guitars
order: 0
trackName: Timple Canario (tablature)
longName: Timple Canario
musicXMLid: pluck.guitar
staffTypePreset: tab5StrSimple
genres: world

Then, add instrumnt playback setup data to SETUP_DATA_MAP at src/engraving/playback/mapping/stringssetupdataresolver.cpp:

        { "timple-canario", { SoundId::TimpleCanario, SoundCategory::Strings, { SoundSubCategory::Acoustic,
                                                                                SoundSubCategory::Nylon,
                                                                                SoundSubCategory::Spanish,
                                                                                SoundSubCategory::Plucked } } },
        { "timple-canario-tablature", { SoundId::TimpleCanario, SoundCategory::Strings, { SoundSubCategory::Acoustic,
                                                                                          SoundSubCategory::Nylon,
                                                                                          SoundSubCategory::Spanish,
                                                                                          SoundSubCategory::Plucked } } },

add SoundId at src/framework/mpe/soundid.h:

enum class SoundId
{
...
  TimpleCanario,
...
};

and also item in ID_STRINGS:

    { SoundId::TimpleCanario, String(u"timple") },

add nylon string sound in STRINGS_MAPPINGS at src/framework/audio/internal/synthesizers/fluidsynth/soundmapping.h:

        { { mpe::SoundId::TimpleCanario,  { mpe::SoundSubCategory::Acoustic,
                                            mpe::SoundSubCategory::Nylon,
                                            mpe::SoundSubCategory::Spanish,
                                            mpe::SoundSubCategory::Plucked } }, { midi::Program(0, 24) } },

I believe this is all that needs to be done, but I haven't compiled or tested these changes.

Problem to be solved

The problem we aim to address is the inconvenience faced by users who wish to write scores for this instrument. Currently, users must manually add the instrument and define its parameters, which can be time-consuming and prone to errors. By including the Timple-Canario in the predefined list of plucked string instruments, users can seamlessly select it from the instruments dialog without the need for manual input.

The Timple-Canario is a traditional string instrument from the Canary Islands, and its inclusion would greatly benefit users interested in composing or arranging music for this unique instrument.

Prior art

No response

Additional context

The Timple Canario is a traditional string instrument originating from the Canary Islands, Spain. With its small body and five strings it produces a bright, melodic sound that is characteristic of Canarian folk music.

More info on:

fefal64 commented 6 months ago

I have missed column "K" (init) of the Google Sheet "MuseScore Instrument Definitions", and "shortName" needs to be fixed to avoid collision with Timpani instrument.

So the data to be added the MuseScore Instrument Definitions is this:

id: timple-canario
description: Small Spanish 5-string guitar (staff notation).
group: plucked-strings
family: guitars
order: 0
trackName: Timple Canario
longName: Timple Canario
shortName: Timpl.
minP sound: E4
minA sound: E4
maxA sound: D6
maxP sound: G#6
minP: 64
minA: 64
maxA: 86
maxP: 92
musicXMLid: pluck.guitar
clefs: G
barlineSpans: 1
SND: 0
frets: 18
stringsFretted: 67;72;64;69;74
genres: world

and for tablature:

id: timple-canario-tablature
description: Small Spanish 5-string guitar (tablature).
init: timple-canario
group: plucked-strings
family: guitars
order: 0
trackName: Timple Canario (tablature)
longName: Timple Canario
musicXMLid: pluck.guitar
staffTypePreset: tab5StrSimple
genres: world

I was able to check this info using my own copy of the sheet, adding this information and modding update_instruments_xml.py to use it. You can check it and the results in this commit: https://github.com/musescore/MuseScore/commit/4fcba9eff4a36f2fb64ba031d5585fc014ddeaf4

As you can see some updates to instruments.xml were already pending.

fefal64 commented 6 months ago

@shoogle, issues #17323, #21388 and #17937 are similar to this feature request, so I could prepare another PR to fix them.