LCOV - code coverage report
Current view: top level - src/notationscene - notationcommands.h Coverage Total Hit
Test: filtered_coverage.info Lines: 94.4 % 18 17
Test Date: 2026-11-19 04:14:36

            Line data    Source code
       1              : /*
       2              :  * SPDX-License-Identifier: GPL-3.0-only
       3              :  * MuseScore-Studio-CLA-applies
       4              :  *
       5              :  * MuseScore Studio
       6              :  * Music Composition & Notation
       7              :  *
       8              :  * Copyright (C) MuseScore Limited and others
       9              :  *
      10              :  * This program is free software: you can redistribute it and/or modify
      11              :  * it under the terms of the GNU General Public License version 3 as
      12              :  * published by the Free Software Foundation.
      13              :  *
      14              :  * This program is distributed in the hope that it will be useful,
      15              :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16              :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17              :  * GNU General Public License for more details.
      18              :  *
      19              :  * You should have received a copy of the GNU General Public License
      20              :  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
      21              :  */
      22              : 
      23              : #pragma once
      24              : 
      25              : #include "rcommand/typedcommand.h"
      26              : #include "notationcommandsenums.h" // IWYU pragma: export
      27              : 
      28              : namespace mu::notation {
      29              : using muse::MnemonicString;
      30              : using muse::TranslatableString;
      31              : using muse::rcommand::Command;
      32              : using muse::rcommand::DataType;
      33              : using muse::rcommand::FieldsScheme;
      34              : using muse::rcommand::Field;
      35              : using muse::rcommand::Presence;
      36              : using muse::rcommand::Availability;
      37              : using muse::rcommand::Annotation;
      38              : using muse::rcommand::Decoration;
      39              : using muse::rcommand::Checkable;
      40              : 
      41              : struct CancelCommand {
      42              :     cprop_decl id = Command("command://notation/cancel");
      43              :     cprop_decl title = MnemonicString("action", "Cancel");
      44              :     cprop_decl description = TranslatableString("action", "Cancel the current notation operation");
      45              :     cprop_decl availabilities = Availability::All;
      46              : };
      47              : 
      48              : struct UndoCommand {
      49              :     cprop_decl id = Command("command://notation/undo");
      50              :     cprop_decl title = MnemonicString("action", "Undo");
      51              :     cprop_decl description = TranslatableString("action", "Undo the last notation operation");
      52              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::UNDO);
      53              :     cprop_decl availabilities = Availability::All;
      54              : };
      55              : 
      56              : struct RedoCommand {
      57              :     cprop_decl id = Command("command://notation/redo");
      58              :     cprop_decl title = MnemonicString("action", "Redo");
      59              :     cprop_decl description = TranslatableString("action", "Redo the last notation operation");
      60              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::REDO);
      61              :     cprop_decl availabilities = Availability::All;
      62              : };
      63              : 
      64              : struct CopyCommand {
      65              :     cprop_decl id = Command("command://notation/copy");
      66              :     cprop_decl title = MnemonicString("action", "&Copy");
      67              :     cprop_decl description = TranslatableString("action", "Copy the current notation element");
      68              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::COPY);
      69              :     cprop_decl availabilities = Availability::All;
      70              :     cprop_decl annotations = Annotation::Idempotent;
      71              : };
      72              : 
      73              : struct CopyPasteSwapCommand {
      74              :     cprop_decl id = Command("command://notation/copy-paste-swap");
      75              :     cprop_decl title = MnemonicString("action", "&Swap with clipboard");
      76              :     cprop_decl description = TranslatableString("action", "Copy/paste: swap with clipboard");
      77              :     cprop_decl availabilities = Availability::All;
      78              : };
      79              : 
      80              : struct CopyLyricsCommand {
      81              :     cprop_decl id = Command("command://notation/copy-lyrics");
      82              :     cprop_decl title = MnemonicString("action", "Copy &lyrics to clipboard");
      83              :     cprop_decl description = TranslatableString("action", "Copy lyrics");
      84              :     cprop_decl availabilities = Availability::All;
      85              : };
      86              : 
      87              : struct CutCommand {
      88              :     cprop_decl id = Command("command://notation/cut");
      89              :     cprop_decl title = MnemonicString("action", "Cu&t");
      90              :     cprop_decl description = TranslatableString("action", "Cut the current notation element");
      91              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::CUT);
      92              :     cprop_decl availabilities = Availability::All;
      93              : };
      94              : 
      95              : struct PasteCommand {
      96              :     cprop_decl id = Command("command://notation/paste");
      97              :     cprop_decl title = MnemonicString("action", "Paste");
      98              :     cprop_decl description = TranslatableString("action", "Paste the current notation element");
      99              :     cprop_decl availabilities = Availability::API;
     100              : 
     101              :     PastingType type = PastingType::Default;
     102              : 
     103              :     cprop_decl input = FieldsScheme {
     104              :         Field{ "type", &PasteCommand::type, "Pasting type", Presence::Optional },
     105              :     };
     106              : };
     107              : 
     108              : // aliases for paste command
     109              : 
     110              : struct PasteDefaultCommand {
     111              :     cprop_decl id = Command("command://notation/paste/default");
     112              :     cprop_decl title = MnemonicString("action", "Past&e");
     113              :     cprop_decl description = TranslatableString("action", "Paste the current notation element");
     114              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::PASTE);
     115              :     cprop_decl availabilities = Availability::UI;
     116              :     cprop_decl redirect = PasteCommand(PastingType::Default);
     117              : };
     118              : 
     119              : struct PasteHalfCommand {
     120              :     cprop_decl id = Command("command://notation/paste/half");
     121              :     cprop_decl title = MnemonicString("action", "Paste &half duration");
     122              :     cprop_decl description = TranslatableString("action", "Paste half duration");
     123              :     cprop_decl availabilities = Availability::UI;
     124              :     cprop_decl redirect = PasteCommand(PastingType::Half);
     125              : };
     126              : 
     127              : struct PasteDoubleCommand {
     128              :     cprop_decl id = Command("command://notation/paste/double");
     129              :     cprop_decl title = MnemonicString("action", "Paste &double duration");
     130              :     cprop_decl description = TranslatableString("action", "Paste double duration");
     131              :     cprop_decl availabilities = Availability::UI;
     132              :     cprop_decl redirect = PasteCommand(PastingType::Double);
     133              : };
     134              : 
     135              : struct PasteSpecialCommand {
     136              :     cprop_decl id = Command("command://notation/paste/special");
     137              :     cprop_decl title = MnemonicString("action", "Paste special");
     138              :     cprop_decl description = TranslatableString("action", "Paste special");
     139              :     cprop_decl availabilities = Availability::UI;
     140              :     cprop_decl redirect = PasteCommand(PastingType::Special);
     141              : };
     142              : 
     143              : struct DeleteCommand {
     144              :     cprop_decl id = Command("command://notation/delete");
     145              :     cprop_decl title = MnemonicString("action", "De&lete");
     146              :     cprop_decl description = TranslatableString("action", "Delete the current notation element");
     147              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::DELETE_TANK);
     148              :     cprop_decl availabilities = Availability::All;
     149              : };
     150              : 
     151              : // select commands
     152              : struct SelectCommand {
     153              :     cprop_decl id = Command("command://notation/select");
     154              :     cprop_decl title = MnemonicString("action", "Select");
     155              :     cprop_decl description = TranslatableString("action", "Select items by target");
     156              :     cprop_decl availabilities = Availability::API;
     157              :     cprop_decl annotations = Annotation::None;
     158              : 
     159              :     SelectionTarget target = SelectionTarget::FirstItem;
     160              :     PlayMode playMode = PlayMode::NoPlay;
     161              : 
     162              :     cprop_decl input = FieldsScheme {
     163              :         Field{ "target", &SelectCommand::target, "Selection target" },
     164              :         Field{ "play-mode", &SelectCommand::playMode, "Play mode", Presence::Optional },
     165              :     };
     166              : };
     167              : 
     168              : // aliases for select command
     169              : struct SelectFirstItemCommand {
     170              :     cprop_decl id = Command("command://notation/select/first-item");
     171              :     cprop_decl title = MnemonicString("action", "First element");
     172              :     cprop_decl description = TranslatableString("action", "Go to first element in score");
     173              :     cprop_decl availabilities = Availability::UI;
     174              :     cprop_decl redirect = SelectCommand(SelectionTarget::FirstItem, PlayMode::PlayChord);
     175              : };
     176              : 
     177              : struct SelectLastItemCommand {
     178              :     cprop_decl id = Command("command://notation/select/last-item");
     179              :     cprop_decl title = MnemonicString("action", "Last element");
     180              :     cprop_decl description = TranslatableString("action", "Go to last element in score");
     181              :     cprop_decl availabilities = Availability::UI;
     182              :     cprop_decl redirect = SelectCommand(SelectionTarget::LastItem, PlayMode::PlayChord);
     183              : };
     184              : 
     185              : struct SelectNextItemCommand {
     186              :     cprop_decl id = Command("command://notation/select/next-item");
     187              :     cprop_decl title = MnemonicString("action", "Next element");
     188              :     cprop_decl description = TranslatableString("action", "Select next element in score");
     189              :     cprop_decl availabilities = Availability::UI;
     190              :     cprop_decl redirect = SelectCommand(SelectionTarget::NextItem, PlayMode::PlayNote);
     191              : };
     192              : 
     193              : struct SelectPrevItemCommand {
     194              :     cprop_decl id = Command("command://notation/select/prev-item");
     195              :     cprop_decl title = MnemonicString("action", "Previous element");
     196              :     cprop_decl description = TranslatableString("action", "Select previous element in score");
     197              :     cprop_decl availabilities = Availability::UI;
     198              :     cprop_decl redirect = SelectCommand(SelectionTarget::PrevItem, PlayMode::PlayNote);
     199              : };
     200              : 
     201              : struct SelectNextSegmentCommand {
     202              :     cprop_decl id = Command("command://notation/select/next-segment");
     203              :     cprop_decl title = MnemonicString("action", "Next segment element");
     204              :     cprop_decl description = TranslatableString("action", "Select next segment element");
     205              :     cprop_decl availabilities = Availability::UI;
     206              :     cprop_decl redirect = SelectCommand(SelectionTarget::NextSegment, PlayMode::PlayNote);
     207              : };
     208              : 
     209              : struct SelectPrevSegmentCommand {
     210              :     cprop_decl id = Command("command://notation/select/prev-segment");
     211              :     cprop_decl title = MnemonicString("action", "Previous segment element");
     212              :     cprop_decl description = TranslatableString("action", "Select previous segment element");
     213              :     cprop_decl availabilities = Availability::UI;
     214              :     cprop_decl redirect = SelectCommand(SelectionTarget::PrevSegment, PlayMode::PlayNote);
     215              : };
     216              : 
     217              : struct SelectNextTrackCommand {
     218              :     cprop_decl id = Command("command://notation/select/next-track");
     219              :     cprop_decl title = MnemonicString("action", "Next staff or voice");
     220              :     cprop_decl description = TranslatableString("action", "Go to next staff or voice");
     221              :     cprop_decl availabilities = Availability::UI;
     222              :     cprop_decl redirect = SelectCommand(SelectionTarget::NextTrack, PlayMode::PlayChord);
     223              : };
     224              : 
     225              : struct SelectPrevTrackCommand {
     226              :     cprop_decl id = Command("command://notation/select/prev-track");
     227              :     cprop_decl title = MnemonicString("action", "Previous staff or voice");
     228              :     cprop_decl description = TranslatableString("action", "Go to previous staff or voice");
     229              :     cprop_decl availabilities = Availability::UI;
     230              :     cprop_decl redirect = SelectCommand(SelectionTarget::PrevTrack, PlayMode::PlayChord);
     231              : };
     232              : 
     233              : struct SelectNextFrameCommand {
     234              :     cprop_decl id = Command("command://notation/select/next-frame");
     235              :     cprop_decl title = MnemonicString("action", "Next frame");
     236              :     cprop_decl description = TranslatableString("action", "Go to next frame");
     237              :     cprop_decl availabilities = Availability::UI;
     238              :     cprop_decl redirect = SelectCommand(SelectionTarget::NextFrame);
     239              : };
     240              : 
     241              : struct SelectPrevFrameCommand {
     242              :     cprop_decl id = Command("command://notation/select/prev-frame");
     243              :     cprop_decl title = MnemonicString("action", "Previous frame");
     244              :     cprop_decl description = TranslatableString("action", "Go to previous frame");
     245              :     cprop_decl availabilities = Availability::UI;
     246              :     cprop_decl redirect = SelectCommand(SelectionTarget::PrevFrame);
     247              : };
     248              : 
     249              : struct SelectNextSystemCommand {
     250              :     cprop_decl id = Command("command://notation/select/next-system");
     251              :     cprop_decl title = MnemonicString("action", "Next system");
     252              :     cprop_decl description = TranslatableString("action", "Go to next system");
     253              :     cprop_decl availabilities = Availability::UI;
     254              :     cprop_decl redirect = SelectCommand(SelectionTarget::NextSystem);
     255              : };
     256              : 
     257              : struct SelectPrevSystemCommand {
     258              :     cprop_decl id = Command("command://notation/select/prev-system");
     259              :     cprop_decl title = MnemonicString("action", "Previous system");
     260              :     cprop_decl description = TranslatableString("action", "Go to previous system");
     261              :     cprop_decl availabilities = Availability::UI;
     262              :     cprop_decl redirect = SelectCommand(SelectionTarget::PrevSystem);
     263              : };
     264              : 
     265              : struct SelectUpNoteInChordCommand {
     266              :     cprop_decl id = Command("command://notation/select/up-note-in-chord");
     267              :     cprop_decl title = MnemonicString("action", "Up note in chord");
     268              :     cprop_decl description = TranslatableString("action", "Select note/rest above");
     269              :     cprop_decl availabilities = Availability::UI;
     270              :     cprop_decl redirect = SelectCommand(SelectionTarget::UpNoteInChord);
     271              : };
     272              : 
     273              : struct SelectDownNoteInChordCommand {
     274              :     cprop_decl id = Command("command://notation/select/down-note-in-chord");
     275              :     cprop_decl title = MnemonicString("action", "Down note in chord");
     276              :     cprop_decl description = TranslatableString("action", "Select note/rest below");
     277              :     cprop_decl availabilities = Availability::UI;
     278              :     cprop_decl redirect = SelectCommand(SelectionTarget::DownNoteInChord);
     279              : };
     280              : 
     281              : struct SelectTopNoteInChordCommand {
     282              :     cprop_decl id = Command("command://notation/select/top-note-in-chord");
     283              :     cprop_decl title = MnemonicString("action", "Top note in chord");
     284              :     cprop_decl description = TranslatableString("action", "Select top note in chord");
     285              :     cprop_decl availabilities = Availability::UI;
     286              :     cprop_decl redirect = SelectCommand(SelectionTarget::TopNoteInChord);
     287              : };
     288              : 
     289              : struct SelectBottomNoteInChordCommand {
     290              :     cprop_decl id = Command("command://notation/select/bottom-note-in-chord");
     291              :     cprop_decl title = MnemonicString("action", "Bottom note in chord");
     292              :     cprop_decl description = TranslatableString("action", "Select bottom note in chord");
     293              :     cprop_decl availabilities = Availability::UI;
     294              :     cprop_decl redirect = SelectCommand(SelectionTarget::BottomNoteInChord);
     295              : };
     296              : 
     297              : struct SelectTopStaffCommand {
     298              :     cprop_decl id = Command("command://notation/select/top-staff");
     299              :     cprop_decl title = MnemonicString("action", "Go to top staff");
     300              :     cprop_decl description = TranslatableString("action", "Go to top staff");
     301              :     cprop_decl availabilities = Availability::UI;
     302              :     cprop_decl redirect = SelectCommand(SelectionTarget::TopStaff, PlayMode::PlayChord);
     303              : };
     304              : 
     305              : struct SelectEmptyTrailingMeasureCommand {
     306              :     cprop_decl id = Command("command://notation/select/empty-trailing-measure");
     307              :     cprop_decl title = MnemonicString("action", "Go to first empty trailing measure");
     308              :     cprop_decl description = TranslatableString("action", "Go to first empty trailing measure");
     309              :     cprop_decl availabilities = Availability::UI;
     310              :     cprop_decl redirect = SelectCommand(SelectionTarget::EmptyTrailingMeasure);
     311              : };
     312              : 
     313              : struct SelectSimilarCommand {
     314              :     cprop_decl id = Command("command://notation/select/similar");
     315              :     cprop_decl title = MnemonicString("action", "Similar");
     316              :     cprop_decl description = TranslatableString("action", "Select similar elements");
     317              :     cprop_decl availabilities = Availability::UI;
     318              :     cprop_decl redirect = SelectCommand(SelectionTarget::Similar);
     319              : };
     320              : 
     321              : struct SelectSimilarInStaffCommand {
     322              :     cprop_decl id = Command("command://notation/select/similar-in-staff");
     323              :     cprop_decl title = MnemonicString("action", "Similar on this staff");
     324              :     cprop_decl description = TranslatableString("action", "Select similar elements on the same staff");
     325              :     cprop_decl availabilities = Availability::UI;
     326              :     cprop_decl redirect = SelectCommand(SelectionTarget::SimilarInStaff);
     327              : };
     328              : 
     329              : struct SelectSimilarInRangeCommand {
     330              :     cprop_decl id = Command("command://notation/select/similar-in-range");
     331              :     cprop_decl title = MnemonicString("action", "Similar in this range");
     332              :     cprop_decl description = TranslatableString("action", "Select similar elements in the selected range");
     333              :     cprop_decl availabilities = Availability::UI;
     334              :     cprop_decl redirect = SelectCommand(SelectionTarget::SimilarInRange);
     335              : };
     336              : 
     337              : struct SelectNotesInChordCommand {
     338              :     cprop_decl id = Command("command://notation/select/notes-in-chord");
     339              :     cprop_decl title = MnemonicString("action", "Notes in chord");
     340              :     cprop_decl description = TranslatableString("action", "Select notes in chord");
     341              :     cprop_decl availabilities = Availability::UI;
     342              :     cprop_decl redirect = SelectCommand(SelectionTarget::NotesInChord);
     343              : };
     344              : 
     345              : struct SelectAllCommand {
     346              :     cprop_decl id = Command("command://notation/select/all");
     347              :     cprop_decl title = MnemonicString("action", "Select &all");
     348              :     cprop_decl description = TranslatableString("action", "Select all");
     349              :     cprop_decl availabilities = Availability::UI;
     350              :     cprop_decl redirect = SelectCommand(SelectionTarget::All);
     351              : };
     352              : 
     353              : struct SelectSectionCommand {
     354              :     cprop_decl id = Command("command://notation/select/section");
     355              :     cprop_decl title = MnemonicString("action", "Select sectio&n");
     356              :     cprop_decl description = TranslatableString("action", "Select section");
     357              :     cprop_decl availabilities = Availability::UI;
     358              :     cprop_decl redirect = SelectCommand(SelectionTarget::Section);
     359              : };
     360              : 
     361              : struct AddToSelectionCommand {
     362              :     cprop_decl id = Command("command://notation/add-to-selection");
     363              :     cprop_decl title = MnemonicString("action", "Add to selection");
     364              :     cprop_decl description = TranslatableString("action", "Add items to selection by target");
     365              :     cprop_decl availabilities = Availability::API;
     366              :     cprop_decl annotations = Annotation::None;
     367              : 
     368              :     SelectionTarget target = SelectionTarget::BeginSystem;
     369              : 
     370              :     cprop_decl input = FieldsScheme {
     371              :         Field{ "target", &AddToSelectionCommand::target, "Selection target" },
     372              :     };
     373              : };
     374              : 
     375              : // aliases for add to selection command
     376              : struct AddToSelectionNextChordCommand {
     377              :     cprop_decl id = Command("command://notation/add-to-selection/next-chord");
     378              :     cprop_decl title = MnemonicString("action", "Add next chord to selection");
     379              :     cprop_decl description = TranslatableString("action", "Add to selection: next note/rest");
     380              :     cprop_decl availabilities = Availability::UI;
     381              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::NextChord);
     382              : };
     383              : 
     384              : struct AddToSelectionPrevChordCommand {
     385              :     cprop_decl id = Command("command://notation/add-to-selection/prev-chord");
     386              :     cprop_decl title = MnemonicString("action", "Add previous chord to selection");
     387              :     cprop_decl description = TranslatableString("action", "Add to selection: previous note/rest");
     388              :     cprop_decl availabilities = Availability::UI;
     389              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::PrevChord);
     390              : };
     391              : 
     392              : struct AddToSelectionNextMeasureCommand {
     393              :     cprop_decl id = Command("command://notation/add-to-selection/next-measure");
     394              :     cprop_decl title = MnemonicString("action", "Add next measure to selection");
     395              :     cprop_decl description = TranslatableString("action", "Add to selection: next measure");
     396              :     cprop_decl availabilities = Availability::UI;
     397              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::NextMeasure);
     398              : };
     399              : 
     400              : struct AddToSelectionPrevMeasureCommand {
     401              :     cprop_decl id = Command("command://notation/add-to-selection/prev-measure");
     402              :     cprop_decl title = MnemonicString("action", "Add previous measure to selection");
     403              :     cprop_decl description = TranslatableString("action", "Add to selection: previous measure");
     404              :     cprop_decl availabilities = Availability::UI;
     405              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::PrevMeasure);
     406              : };
     407              : 
     408              : struct AddToSelectionAboveStaffCommand {
     409              :     cprop_decl id = Command("command://notation/add-to-selection/above-staff");
     410              :     cprop_decl title = MnemonicString("action", "Add staff above to selection");
     411              :     cprop_decl description = TranslatableString("action", "Add to selection: staff above");
     412              :     cprop_decl availabilities = Availability::UI;
     413              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::AboveStaff);
     414              : };
     415              : 
     416              : struct AddToSelectionBelowStaffCommand {
     417              :     cprop_decl id = Command("command://notation/add-to-selection/below-staff");
     418              :     cprop_decl title = MnemonicString("action", "Add staff below to selection");
     419              :     cprop_decl description = TranslatableString("action", "Add to selection: staff below");
     420              :     cprop_decl availabilities = Availability::UI;
     421              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::BelowStaff);
     422              : };
     423              : 
     424              : struct AddToSelectionBeginSystemCommand {
     425              :     cprop_decl id = Command("command://notation/add-to-selection/begin-system");
     426              :     cprop_decl title = MnemonicString("action", "Select to beginning of system");
     427              :     cprop_decl description = TranslatableString("action", "Add to selection: beginning of system");
     428              :     cprop_decl availabilities = Availability::UI;
     429              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::BeginSystem);
     430              : };
     431              : 
     432              : struct AddToSelectionEndSystemCommand {
     433              :     cprop_decl id = Command("command://notation/add-to-selection/end-system");
     434              :     cprop_decl title = MnemonicString("action", "Select to end of system");
     435              :     cprop_decl description = TranslatableString("action", "Add to selection: end of system");
     436              :     cprop_decl availabilities = Availability::UI;
     437              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::EndSystem);
     438              : };
     439              : 
     440              : struct AddToSelectionBeginScoreCommand {
     441              :     cprop_decl id = Command("command://notation/add-to-selection/begin-score");
     442              :     cprop_decl title = MnemonicString("action", "Select to beginning of score");
     443              :     cprop_decl description = TranslatableString("action", "Add to selection: beginning of score");
     444              :     cprop_decl availabilities = Availability::UI;
     445              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::BeginScore);
     446              : };
     447              : 
     448              : struct AddToSelectionEndScoreCommand {
     449              :     cprop_decl id = Command("command://notation/add-to-selection/end-score");
     450              :     cprop_decl title = MnemonicString("action", "Select to end of score");
     451              :     cprop_decl description = TranslatableString("action", "Add to selection: end of score");
     452              :     cprop_decl availabilities = Availability::UI;
     453              :     cprop_decl redirect = AddToSelectionCommand(SelectionTarget::EndScore);
     454              : };
     455              : 
     456              : struct OpenSelectionOptionsCommand {
     457              :     cprop_decl id = Command("command://notation/open-selection-options");
     458              :     cprop_decl title = MnemonicString("action", "Selection options");
     459              :     cprop_decl description = TranslatableString("action", "Open selection options");
     460              :     cprop_decl availabilities = Availability::UI;
     461              : };
     462              : 
     463              : struct ShowLocationCommand {
     464              :     cprop_decl id = Command("command://notation/show-location");
     465              :     cprop_decl title = MnemonicString("action", "Show location");
     466              :     cprop_decl description = TranslatableString("action", "Show current location in score");
     467              :     cprop_decl availabilities = Availability::UI;
     468              : };
     469              : 
     470              : // note input commands
     471              : struct ToggleNoteInputCommand {
     472              :     cprop_decl id = Command("command://notation/toggle-note-input");
     473              :     cprop_decl title = MnemonicString("action", "Toggle note input");
     474              :     cprop_decl description = TranslatableString("action", "Toggle note input");
     475              :     cprop_decl availabilities = Availability::API;
     476              : 
     477              :     NoteInputMethod method = NoteInputMethod::DEFAULT;
     478              : 
     479              :     cprop_decl input = FieldsScheme {
     480              :         Field{ "method", &ToggleNoteInputCommand::method, "Note input method" },
     481              :     };
     482              : };
     483              : 
     484              : // aliases for toggle note input command
     485              : struct ToggleNoteInputDefaultCommand {
     486              :     cprop_decl id = Command("command://notation/toggle-note-input/default");
     487              :     cprop_decl title = MnemonicString("action", "Note input");
     488              :     cprop_decl description = TranslatableString("action", "Toggle note input mode");
     489              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::EDIT, Checkable::Yes);
     490              :     cprop_decl availabilities = Availability::UI;
     491              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::DEFAULT);
     492              : };
     493              : 
     494              : struct ToggleNoteInputByNameCommand {
     495              :     cprop_decl id = Command("command://notation/toggle-note-input/by-note-name");
     496              :     cprop_decl title = MnemonicString("action", "Note input by note name");
     497              :     cprop_decl description = TranslatableString("action", "Toggle note input mode by note name");
     498              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::EDIT, Checkable::Yes);
     499              :     cprop_decl availabilities = Availability::UI;
     500              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::BY_NOTE_NAME);
     501              : };
     502              : 
     503              : struct ToggleNoteInputByDurationCommand {
     504              :     cprop_decl id = Command("command://notation/toggle-note-input/by-duration");
     505              :     cprop_decl title = MnemonicString("action", "Note input by duration");
     506              :     cprop_decl description = TranslatableString("action", "Toggle note input mode by duration");
     507              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::DURATION_CURSOR, Checkable::Yes);
     508              :     cprop_decl availabilities = Availability::UI;
     509              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::BY_DURATION);
     510              : };
     511              : 
     512              : struct ToggleNoteInputRhythmCommand {
     513              :     cprop_decl id = Command("command://notation/toggle-note-input/rhythm");
     514              :     cprop_decl title = MnemonicString("action", "Rhythm only (not pitch)");
     515              :     cprop_decl description = TranslatableString("action", "Toggle note input mode: rhythm only (not pitch)");
     516              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::RHYTHM_ONLY, Checkable::Yes);
     517              :     cprop_decl availabilities = Availability::UI;
     518              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::RHYTHM);
     519              : };
     520              : 
     521              : struct ToggleNoteInputRepitchCommand {
     522              :     cprop_decl id = Command("command://notation/toggle-note-input/repitch");
     523              :     cprop_decl title = MnemonicString("action", "Re-pitch existing notes");
     524              :     cprop_decl description = TranslatableString("action", "Toggle note input mode: re-pitch existing notes");
     525              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::RE_PITCH, Checkable::Yes);
     526              :     cprop_decl availabilities = Availability::UI;
     527              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::REPITCH);
     528              : };
     529              : 
     530              : struct ToggleNoteInputRealtimeAutoCommand {
     531              :     cprop_decl id = Command("command://notation/toggle-note-input/realtime-auto");
     532              :     cprop_decl title = MnemonicString("action", "Real-time (metronome)");
     533              :     cprop_decl description = TranslatableString("action", "Toggle note input mode: real-time (metronome)");
     534              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::METRONOME, Checkable::Yes);
     535              :     cprop_decl availabilities = Availability::UI;
     536              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::REALTIME_AUTO);
     537              : };
     538              : 
     539              : struct ToggleNoteInputRealtimeManualCommand {
     540              :     cprop_decl id = Command("command://notation/toggle-note-input/realtime-manual");
     541              :     cprop_decl title = MnemonicString("action", "Real-time (foot pedal)");
     542              :     cprop_decl description = TranslatableString("action", "Toggle note input mode: real-time (foot pedal)");
     543              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::FOOT_PEDAL, Checkable::Yes);
     544              :     cprop_decl availabilities = Availability::UI;
     545              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::REALTIME_MANUAL);
     546              : };
     547              : 
     548              : struct ToggleNoteInputTimewiseCommand {
     549              :     cprop_decl id = Command("command://notation/toggle-note-input/timewise");
     550              :     cprop_decl title = MnemonicString("action", "Insert");
     551              :     cprop_decl description = TranslatableString("action", "Toggle note input mode: insert (increases measure duration)");
     552              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_PLUS, Checkable::Yes);
     553              :     cprop_decl availabilities = Availability::UI;
     554              :     cprop_decl redirect = ToggleNoteInputCommand(NoteInputMethod::TIMEWISE);
     555              : };
     556              : 
     557              : struct ToggleInsertModeCommand {
     558              :     cprop_decl id = Command("command://notation/toggle-note-input/toggle-insert-mode");
     559              :     cprop_decl title = MnemonicString("action", "Insert/overwrite");
     560              :     cprop_decl description = TranslatableString("action", "Toggle note input mode: insert/overwrite");
     561              :     cprop_decl availabilities = Availability::UI;
     562              : };
     563              : 
     564              : // note input set duration commands
     565              : struct SetDurationCommand {
     566              :     cprop_decl id = Command("command://notation/set-duration");
     567              :     cprop_decl title = MnemonicString("action", "Set duration");
     568              :     cprop_decl description = TranslatableString("action", "Set duration");
     569              :     cprop_decl availabilities = Availability::API;
     570              : 
     571              :     DurationType duration = DurationType::V_QUARTER;
     572              : 
     573              :     cprop_decl input = FieldsScheme {
     574              :         Field{ "duration", &SetDurationCommand::duration, "Duration" },
     575              :     };
     576              : };
     577              : 
     578              : // aliases for set duration commands
     579              : struct SetDurationLongaCommand {
     580              :     cprop_decl id = Command("command://notation/set-duration/longa");
     581              :     cprop_decl title = MnemonicString("action", "Longa");
     582              :     cprop_decl description = TranslatableString("action", "Set duration: longa");
     583              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::LONGO);
     584              :     cprop_decl availabilities = Availability::UI;
     585              :     cprop_decl redirect = SetDurationCommand(DurationType::V_LONG);
     586              : };
     587              : 
     588              : struct SetDurationBreveCommand {
     589              :     cprop_decl id = Command("command://notation/set-duration/breve");
     590              :     cprop_decl title = MnemonicString("action", "Breve");
     591              :     cprop_decl description = TranslatableString("action", "Set duration: breve");
     592              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_WHOLE_DOUBLE);
     593              :     cprop_decl availabilities = Availability::UI;
     594              :     cprop_decl redirect = SetDurationCommand(DurationType::V_BREVE);
     595              : };
     596              : 
     597              : struct SetDurationWholeCommand {
     598              :     cprop_decl id = Command("command://notation/set-duration/whole");
     599              :     cprop_decl title = MnemonicString("action", "Whole note");
     600              :     cprop_decl description = TranslatableString("action", "Set duration: whole note");
     601              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_WHOLE);
     602              :     cprop_decl availabilities = Availability::UI;
     603              :     cprop_decl redirect = SetDurationCommand(DurationType::V_WHOLE);
     604              : };
     605              : 
     606              : struct SetDurationHalfCommand {
     607              :     cprop_decl id = Command("command://notation/set-duration/half");
     608              :     cprop_decl title = MnemonicString("action", "Half note");
     609              :     cprop_decl description = TranslatableString("action", "Set duration: half note");
     610              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_HALF);
     611              :     cprop_decl availabilities = Availability::UI;
     612              :     cprop_decl redirect = SetDurationCommand(DurationType::V_HALF);
     613              : };
     614              : 
     615              : struct SetDurationQuarterCommand {
     616              :     cprop_decl id = Command("command://notation/set-duration/quarter");
     617              :     cprop_decl title = MnemonicString("action", "Quarter note");
     618              :     cprop_decl description = TranslatableString("action", "Set duration: quarter note");
     619              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_QUARTER);
     620              :     cprop_decl availabilities = Availability::UI;
     621              :     cprop_decl redirect = SetDurationCommand(DurationType::V_QUARTER);
     622              : };
     623              : 
     624              : struct SetDurationEighthCommand {
     625              :     cprop_decl id = Command("command://notation/set-duration/eighth");
     626              :     cprop_decl title = MnemonicString("action", "Eighth note");
     627              :     cprop_decl description = TranslatableString("action", "Set duration: eighth note");
     628              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_8TH);
     629              :     cprop_decl availabilities = Availability::UI;
     630              :     cprop_decl redirect = SetDurationCommand(DurationType::V_EIGHTH);
     631              : };
     632              : 
     633              : struct SetDuration16thCommand {
     634              :     cprop_decl id = Command("command://notation/set-duration/16th");
     635              :     cprop_decl title = MnemonicString("action", "16th note");
     636              :     cprop_decl description = TranslatableString("action", "Set duration: 16th note");
     637              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_16TH);
     638              :     cprop_decl availabilities = Availability::UI;
     639              :     cprop_decl redirect = SetDurationCommand(DurationType::V_16TH);
     640              : };
     641              : 
     642              : struct SetDuration32ndCommand {
     643              :     cprop_decl id = Command("command://notation/set-duration/32nd");
     644              :     cprop_decl title = MnemonicString("action", "32nd note");
     645              :     cprop_decl description = TranslatableString("action", "Set duration: 32nd note");
     646              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_32ND);
     647              :     cprop_decl availabilities = Availability::UI;
     648              :     cprop_decl redirect = SetDurationCommand(DurationType::V_32ND);
     649              : };
     650              : 
     651              : struct SetDuration64thCommand {
     652              :     cprop_decl id = Command("command://notation/set-duration/64th");
     653              :     cprop_decl title = MnemonicString("action", "64th note");
     654              :     cprop_decl description = TranslatableString("action", "Set duration: 64th note");
     655              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_64TH);
     656              :     cprop_decl availabilities = Availability::UI;
     657              :     cprop_decl redirect = SetDurationCommand(DurationType::V_64TH);
     658              : };
     659              : 
     660              : struct SetDuration128thCommand {
     661              :     cprop_decl id = Command("command://notation/set-duration/128th");
     662              :     cprop_decl title = MnemonicString("action", "128th note");
     663              :     cprop_decl description = TranslatableString("action", "Set duration: 128th note");
     664              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_128TH);
     665              :     cprop_decl availabilities = Availability::UI;
     666              :     cprop_decl redirect = SetDurationCommand(DurationType::V_128TH);
     667              : };
     668              : 
     669              : struct SetDuration256thCommand {
     670              :     cprop_decl id = Command("command://notation/set-duration/256th");
     671              :     cprop_decl title = MnemonicString("action", "256th note");
     672              :     cprop_decl description = TranslatableString("action", "Set duration: 256th note");
     673              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_256TH);
     674              :     cprop_decl availabilities = Availability::UI;
     675              :     cprop_decl redirect = SetDurationCommand(DurationType::V_256TH);
     676              : };
     677              : 
     678              : struct SetDuration512thCommand {
     679              :     cprop_decl id = Command("command://notation/set-duration/512th");
     680              :     cprop_decl title = MnemonicString("action", "512th note");
     681              :     cprop_decl description = TranslatableString("action", "Set duration: 512th note");
     682              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_512TH);
     683              :     cprop_decl availabilities = Availability::UI;
     684              :     cprop_decl redirect = SetDurationCommand(DurationType::V_512TH);
     685              : };
     686              : 
     687              : struct SetDuration1024thCommand {
     688              :     cprop_decl id = Command("command://notation/set-duration/1024th");
     689              :     cprop_decl title = MnemonicString("action", "1024th note");
     690              :     cprop_decl description = TranslatableString("action", "Set duration: 1024th note");
     691              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_1024TH);
     692              :     cprop_decl availabilities = Availability::UI;
     693              :     cprop_decl redirect = SetDurationCommand(DurationType::V_1024TH);
     694              : };
     695              : 
     696              : // increase/decrease duration commands
     697              : struct ChangeDurationCommand {
     698              :     cprop_decl id = Command("command://notation/change-duration");
     699              :     cprop_decl title = MnemonicString("action", "Change duration");
     700              :     cprop_decl description = TranslatableString("action", "Change duration");
     701              :     cprop_decl availabilities = Availability::API;
     702              : 
     703              :     ChangeDurationMode mode = ChangeDurationMode::Double;
     704              : 
     705              :     cprop_decl input = FieldsScheme {
     706              :         Field{ "mode", &ChangeDurationCommand::mode, "Change duration mode" },
     707              :     };
     708              : };
     709              : 
     710              : // aliases for change duration command
     711              : struct ChangeDurationDoubleCommand {
     712              :     cprop_decl id = Command("command://notation/change-duration/double");
     713              :     cprop_decl title = MnemonicString("action", "Double duration");
     714              :     cprop_decl description = TranslatableString("action", "Double selected duration");
     715              :     cprop_decl availabilities = Availability::UI;
     716              :     cprop_decl redirect = ChangeDurationCommand(ChangeDurationMode::Double);
     717              : };
     718              : 
     719              : struct ChangeDurationHalveCommand {
     720              :     cprop_decl id = Command("command://notation/change-duration/halve");
     721              :     cprop_decl title = MnemonicString("action", "Halve duration");
     722              :     cprop_decl description = TranslatableString("action", "Halve selected duration");
     723              :     cprop_decl availabilities = Availability::UI;
     724              :     cprop_decl redirect = ChangeDurationCommand(ChangeDurationMode::Halve);
     725              : };
     726              : 
     727              : struct ChangeDurationDoubleDottedCommand {
     728              :     cprop_decl id = Command("command://notation/change-duration/double-dotted");
     729              :     cprop_decl title = MnemonicString("action", "Double selected duration (dotted)");
     730              :     cprop_decl description = TranslatableString("action", "Double selected duration (includes dotted values)");
     731              :     cprop_decl availabilities = Availability::UI;
     732              :     cprop_decl redirect = ChangeDurationCommand(ChangeDurationMode::DoubleDotted);
     733              : };
     734              : 
     735              : struct ChangeDurationHalveDottedCommand {
     736              :     cprop_decl id = Command("command://notation/change-duration/halve-dotted");
     737              :     cprop_decl title = MnemonicString("action", "Halve selected duration (dotted)");
     738              :     cprop_decl description = TranslatableString("action", "Halve selected duration (includes dotted values)");
     739              :     cprop_decl availabilities = Availability::UI;
     740              :     cprop_decl redirect = ChangeDurationCommand(ChangeDurationMode::HalveDotted);
     741              : };
     742              : 
     743              : struct ToggleDotsCommand {
     744              :     cprop_decl id = Command("command://notation/toggle-dots");
     745              :     cprop_decl title = MnemonicString("action", "Toggle dots");
     746              :     cprop_decl description = TranslatableString("action", "Toggle dots");
     747              :     cprop_decl availabilities = Availability::API;
     748              : 
     749              :     int dots = 1;
     750              : 
     751              :     cprop_decl input = FieldsScheme {
     752              :         Field{ "dots", &ToggleDotsCommand::dots, "Number of dots", 1, (int)engraving::MAX_DOTS },
     753              :     };
     754              : };
     755              : 
     756              : // aliases for toggle dots command
     757              : struct ToggleDotCommand {
     758              :     cprop_decl id = Command("command://notation/toggle-dots/1");
     759              :     cprop_decl title = MnemonicString("action", "Augmentation dot");
     760              :     cprop_decl description = TranslatableString("action", "Toggle duration dot");
     761              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_DOTTED);
     762              :     cprop_decl availabilities = Availability::UI;
     763              :     cprop_decl redirect = ToggleDotsCommand(1);
     764              : };
     765              : 
     766              : struct ToggleDot2Command {
     767              :     cprop_decl id = Command("command://notation/toggle-dots/2");
     768              :     cprop_decl title = MnemonicString("action", "Double augmentation dot");
     769              :     cprop_decl description = TranslatableString("action", "Toggle duration dot: double");
     770              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_DOTTED_2);
     771              :     cprop_decl availabilities = Availability::UI;
     772              :     cprop_decl redirect = ToggleDotsCommand(2);
     773              : };
     774              : 
     775              : struct ToggleDot3Command {
     776              :     cprop_decl id = Command("command://notation/toggle-dots/3");
     777              :     cprop_decl title = MnemonicString("action", "Triple augmentation dot");
     778              :     cprop_decl description = TranslatableString("action", "Toggle duration dot: triple");
     779              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_DOTTED_3);
     780              :     cprop_decl availabilities = Availability::UI;
     781              :     cprop_decl redirect = ToggleDotsCommand(3);
     782              : };
     783              : 
     784              : struct ToggleDot4Command {
     785              :     cprop_decl id = Command("command://notation/toggle-dots/4");
     786              :     cprop_decl title = MnemonicString("action", "Quadruple augmentation dot");
     787              :     cprop_decl description = TranslatableString("action", "Toggle duration dot: quadruple");
     788              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NOTE_DOTTED_4);
     789              :     cprop_decl availabilities = Availability::UI;
     790              :     cprop_decl redirect = ToggleDotsCommand(4);
     791              : };
     792              : 
     793              : struct ToggleRestCommand {
     794              :     cprop_decl id = Command("command://notation/toggle-rest");
     795              :     cprop_decl title = MnemonicString("action", "Rest");
     796              :     cprop_decl description = TranslatableString("action", "Toggle rest");
     797              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::REST);
     798              :     cprop_decl availabilities = Availability::All;
     799              : };
     800              : 
     801              : struct RequestNoteInputStateCommand {
     802              :     cprop_decl id = Command("command://notation/request-noteinput-state");
     803              :     cprop_decl title = MnemonicString("action", "Get note input state");
     804              :     cprop_decl description = TranslatableString("action", "Get note input state");
     805              :     cprop_decl availabilities = muse::rcommand::Availability::API;
     806              :     cprop_decl annotations = muse::rcommand::Annotation::ReadOnly;
     807              : 
     808              :     struct Output {
     809              :         bool enabled = false;
     810              :         NoteInputMethod method = NoteInputMethod::BY_NOTE_NAME;
     811              :     };
     812              : 
     813              :     using O = RequestNoteInputStateCommand::Output;
     814              :     cprop_decl output = std::tuple {
     815              :         Field{ "enabled", &O::enabled, "Flag indicating whether the note input mode is enabled" },
     816              :         Field{ "method", &O::method, "The method used to input the note" },
     817              :     };
     818              : };
     819              : 
     820              : // add note command
     821              : struct AddNoteCommand {
     822              :     cprop_decl id = muse::rcommand::Command("command://notation/add-note");
     823              :     cprop_decl title = MnemonicString("action", "Add note");
     824              :     cprop_decl description = TranslatableString("action", "Add note");
     825              :     cprop_decl availabilities = Availability::API;
     826              : 
     827              :     NoteName note = NoteName::C;
     828              :     NoteAddingMode mode = NoteAddingMode::NextChord;
     829              : 
     830              :     cprop_decl input = std::tuple {
     831              :         Field{ "note", &AddNoteCommand::note, "Note name" },
     832              :         Field{ "mode", &AddNoteCommand::mode, "Adding mode", Presence::Optional },
     833              :     };
     834              : };
     835              : 
     836              : //! NOTE Shared templates for note commands, declared once to avoid translation duplication.
     837              : //! They are created on first use, so they cannot be used before initialization
     838              : //! (the static initialization order across translation units is undefined).
     839              : namespace prv {
     840              : using TS = TranslatableString;
     841              : //: Note
     842          126 : inline const TS& noteC() { static const TS s = TranslatableString("action", "C"); return s; }
     843              : //: Note
     844          126 : inline const TS& noteD() { static const TS s = TranslatableString("action", "D"); return s; }
     845              : //: Note
     846          126 : inline const TS& noteE() { static const TS s = TranslatableString("action", "E"); return s; }
     847              : //: Note
     848          126 : inline const TS& noteF() { static const TS s = TranslatableString("action", "F"); return s; }
     849              : //: Note
     850          126 : inline const TS& noteG() { static const TS s = TranslatableString("action", "G"); return s; }
     851              : //: Note
     852          126 : inline const TS& noteA() { static const TS s = TranslatableString("action", "A"); return s; }
     853              : //: Note
     854          126 : inline const TS& noteB() { static const TS s = TranslatableString("action", "B"); return s; }
     855              : //: Enter note %1
     856          147 : inline const TS& Enter_note_X() { static const TS s = TranslatableString("action", "Enter note %1"); return s; }
     857              : //: Add %1 to chord
     858          147 : inline const TS& Add_X_to_chord() { static const TS s = TranslatableString("action", "Add %1 to chord"); return s; }
     859              : //: Add note %1 to chord
     860          147 : inline const TS& Add_note_X_to_chord() { static const TS s = TranslatableString("action", "Add note %1 to chord"); return s; }
     861              : //: Insert %1
     862          294 : inline const TS& Insert_X() { static const TS s = TranslatableString("action", "Insert %1"); return s; }
     863              : //: Fret %1 (TAB)
     864          315 : inline const TS& fret_X_TAB() { static const TS s = TranslatableString("action", "Fret %1 (TAB)"); return s; }
     865              : //: Enter TAB: fret %1
     866          315 : inline const TS& enter_TAB_fret_X() { static const TS s = TranslatableString("action", "Enter TAB: fret %1"); return s; }
     867              : } // namespace prv
     868              : 
     869              : // aliases for add note command
     870              : struct AddNoteC_ToNextChordCommand {
     871              :     cprop_decl id = Command("command://notation/add-note/next-chord/c");
     872              :     cprop_decl title = MnemonicString(prv::noteC());
     873              :     cprop_decl description = prv::Enter_note_X().arg(prv::noteC());
     874              :     cprop_decl availabilities = Availability::UI;
     875              :     cprop_decl redirect = AddNoteCommand(NoteName::C, NoteAddingMode::NextChord);
     876              : };
     877              : 
     878              : struct AddNoteD_ToNextChordCommand {
     879              :     cprop_decl id = Command("command://notation/add-note/next-chord/d");
     880              :     cprop_decl title = MnemonicString(prv::noteD());
     881              :     cprop_decl description = prv::Enter_note_X().arg(prv::noteD());
     882              :     cprop_decl availabilities = Availability::UI;
     883              :     cprop_decl redirect = AddNoteCommand(NoteName::D, NoteAddingMode::NextChord);
     884              : };
     885              : 
     886              : struct AddNoteE_ToNextChordCommand {
     887              :     cprop_decl id = Command("command://notation/add-note/next-chord/e");
     888              :     cprop_decl title = MnemonicString(prv::noteE());
     889              :     cprop_decl description = prv::Enter_note_X().arg(prv::noteE());
     890              :     cprop_decl availabilities = Availability::UI;
     891              :     cprop_decl redirect = AddNoteCommand(NoteName::E, NoteAddingMode::NextChord);
     892              : };
     893              : 
     894              : struct AddNoteF_ToNextChordCommand {
     895              :     cprop_decl id = Command("command://notation/add-note/next-chord/f");
     896              :     cprop_decl title = MnemonicString(prv::noteF());
     897              :     cprop_decl description = prv::Enter_note_X().arg(prv::noteF());
     898              :     cprop_decl availabilities = Availability::UI;
     899              :     cprop_decl redirect = AddNoteCommand(NoteName::F, NoteAddingMode::NextChord);
     900              : };
     901              : 
     902              : struct AddNoteG_ToNextChordCommand {
     903              :     cprop_decl id = Command("command://notation/add-note/next-chord/g");
     904              :     cprop_decl title = MnemonicString(prv::noteG());
     905              :     cprop_decl description = prv::Enter_note_X().arg(prv::noteG());
     906              :     cprop_decl availabilities = Availability::UI;
     907              :     cprop_decl redirect = AddNoteCommand(NoteName::G, NoteAddingMode::NextChord);
     908              : };
     909              : 
     910              : struct AddNoteA_ToNextChordCommand {
     911              :     cprop_decl id = Command("command://notation/add-note/next-chord/a");
     912              :     cprop_decl title = MnemonicString(prv::noteA());
     913              :     cprop_decl description = prv::Enter_note_X().arg(prv::noteA());
     914              :     cprop_decl availabilities = Availability::UI;
     915              :     cprop_decl redirect = AddNoteCommand(NoteName::A, NoteAddingMode::NextChord);
     916              : };
     917              : 
     918              : struct AddNoteB_ToNextChordCommand {
     919              :     cprop_decl id = Command("command://notation/add-note/next-chord/b");
     920              :     cprop_decl title = MnemonicString(prv::noteB());
     921              :     cprop_decl description = prv::Enter_note_X().arg(prv::noteB());
     922              :     cprop_decl availabilities = Availability::UI;
     923              :     cprop_decl redirect = AddNoteCommand(NoteName::B, NoteAddingMode::NextChord);
     924              : };
     925              : 
     926              : struct AddNoteC_ToCurrentChordCommand {
     927              :     cprop_decl id = Command("command://notation/add-note/current-chord/c");
     928              :     cprop_decl title = MnemonicString(prv::Add_X_to_chord().arg(prv::noteC()));
     929              :     cprop_decl description = prv::Add_note_X_to_chord().arg(prv::noteC());
     930              :     cprop_decl availabilities = Availability::UI;
     931              :     cprop_decl redirect = AddNoteCommand(NoteName::C, NoteAddingMode::CurrentChord);
     932              : };
     933              : 
     934              : struct AddNoteD_ToCurrentChordCommand {
     935              :     cprop_decl id = Command("command://notation/add-note/current-chord/d");
     936              :     cprop_decl title = MnemonicString(prv::Add_X_to_chord().arg(prv::noteD()));
     937              :     cprop_decl description = prv::Add_note_X_to_chord().arg(prv::noteD());
     938              :     cprop_decl availabilities = Availability::UI;
     939              :     cprop_decl redirect = AddNoteCommand(NoteName::D, NoteAddingMode::CurrentChord);
     940              : };
     941              : 
     942              : struct AddNoteE_ToCurrentChordCommand {
     943              :     cprop_decl id = Command("command://notation/add-note/current-chord/e");
     944              :     cprop_decl title = MnemonicString(prv::Add_X_to_chord().arg(prv::noteE()));
     945              :     cprop_decl description = prv::Add_note_X_to_chord().arg(prv::noteE());
     946              :     cprop_decl availabilities = Availability::UI;
     947              :     cprop_decl redirect = AddNoteCommand(NoteName::E, NoteAddingMode::CurrentChord);
     948              : };
     949              : 
     950              : struct AddNoteF_ToCurrentChordCommand {
     951              :     cprop_decl id = Command("command://notation/add-note/current-chord/f");
     952              :     cprop_decl title = MnemonicString(prv::Add_X_to_chord().arg(prv::noteF()));
     953              :     cprop_decl description = prv::Add_note_X_to_chord().arg(prv::noteF());
     954              :     cprop_decl availabilities = Availability::UI;
     955              :     cprop_decl redirect = AddNoteCommand(NoteName::F, NoteAddingMode::CurrentChord);
     956              : };
     957              : 
     958              : struct AddNoteG_ToCurrentChordCommand {
     959              :     cprop_decl id = Command("command://notation/add-note/current-chord/g");
     960              :     cprop_decl title = MnemonicString(prv::Add_X_to_chord().arg(prv::noteG()));
     961              :     cprop_decl description = prv::Add_note_X_to_chord().arg(prv::noteG());
     962              :     cprop_decl availabilities = Availability::UI;
     963              :     cprop_decl redirect = AddNoteCommand(NoteName::G, NoteAddingMode::CurrentChord);
     964              : };
     965              : 
     966              : struct AddNoteA_ToCurrentChordCommand {
     967              :     cprop_decl id = Command("command://notation/add-note/current-chord/a");
     968              :     cprop_decl title = MnemonicString(prv::Add_X_to_chord().arg(prv::noteA()));
     969              :     cprop_decl description = prv::Add_note_X_to_chord().arg(prv::noteA());
     970              :     cprop_decl availabilities = Availability::UI;
     971              :     cprop_decl redirect = AddNoteCommand(NoteName::A, NoteAddingMode::CurrentChord);
     972              : };
     973              : 
     974              : struct AddNoteB_ToCurrentChordCommand {
     975              :     cprop_decl id = Command("command://notation/add-note/current-chord/b");
     976              :     cprop_decl title = MnemonicString(prv::Add_X_to_chord().arg(prv::noteB()));
     977              :     cprop_decl description = prv::Add_note_X_to_chord().arg(prv::noteB());
     978              :     cprop_decl availabilities = Availability::UI;
     979              :     cprop_decl redirect = AddNoteCommand(NoteName::B, NoteAddingMode::CurrentChord);
     980              : };
     981              : 
     982              : struct AddNoteC_ToInsertChordCommand {
     983              :     cprop_decl id = Command("command://notation/add-note/insert-chord/c");
     984              :     cprop_decl title = MnemonicString(prv::Insert_X().arg(prv::noteC()));
     985              :     cprop_decl description = prv::Insert_X().arg(prv::noteC());
     986              :     cprop_decl availabilities = Availability::UI;
     987              :     cprop_decl redirect = AddNoteCommand(NoteName::C, NoteAddingMode::InsertChord);
     988              : };
     989              : 
     990              : struct AddNoteD_ToInsertChordCommand {
     991              :     cprop_decl id = Command("command://notation/add-note/insert-chord/d");
     992              :     cprop_decl title = MnemonicString(prv::Insert_X().arg(prv::noteD()));
     993              :     cprop_decl description = prv::Insert_X().arg(prv::noteD());
     994              :     cprop_decl availabilities = Availability::UI;
     995              :     cprop_decl redirect = AddNoteCommand(NoteName::D, NoteAddingMode::InsertChord);
     996              : };
     997              : 
     998              : struct AddNoteE_ToInsertChordCommand {
     999              :     cprop_decl id = Command("command://notation/add-note/insert-chord/e");
    1000              :     cprop_decl title = MnemonicString(prv::Insert_X().arg(prv::noteE()));
    1001              :     cprop_decl description = prv::Insert_X().arg(prv::noteE());
    1002              :     cprop_decl availabilities = Availability::UI;
    1003              :     cprop_decl redirect = AddNoteCommand(NoteName::E, NoteAddingMode::InsertChord);
    1004              : };
    1005              : 
    1006              : struct AddNoteF_ToInsertChordCommand {
    1007              :     cprop_decl id = Command("command://notation/add-note/insert-chord/f");
    1008              :     cprop_decl title = MnemonicString(prv::Insert_X().arg(prv::noteF()));
    1009              :     cprop_decl description = prv::Insert_X().arg(prv::noteF());
    1010              :     cprop_decl availabilities = Availability::UI;
    1011              :     cprop_decl redirect = AddNoteCommand(NoteName::F, NoteAddingMode::InsertChord);
    1012              : };
    1013              : 
    1014              : struct AddNoteG_ToInsertChordCommand {
    1015              :     cprop_decl id = Command("command://notation/add-note/insert-chord/g");
    1016              :     cprop_decl title = MnemonicString(prv::Insert_X().arg(prv::noteG()));
    1017              :     cprop_decl description = prv::Insert_X().arg(prv::noteG());
    1018              :     cprop_decl availabilities = Availability::UI;
    1019              :     cprop_decl redirect = AddNoteCommand(NoteName::G, NoteAddingMode::InsertChord);
    1020              : };
    1021              : 
    1022              : struct AddNoteA_ToInsertChordCommand {
    1023              :     cprop_decl id = Command("command://notation/add-note/insert-chord/a");
    1024              :     cprop_decl title = MnemonicString(prv::Insert_X().arg(prv::noteA()));
    1025              :     cprop_decl description = prv::Insert_X().arg(prv::noteA());
    1026              :     cprop_decl availabilities = Availability::UI;
    1027              :     cprop_decl redirect = AddNoteCommand(NoteName::A, NoteAddingMode::InsertChord);
    1028              : };
    1029              : 
    1030              : struct AddNoteB_ToInsertChordCommand {
    1031              :     cprop_decl id = Command("command://notation/add-note/insert-chord/b");
    1032              :     cprop_decl title = MnemonicString(prv::Insert_X().arg(prv::noteB()));
    1033              :     cprop_decl description = prv::Insert_X().arg(prv::noteB());
    1034              :     cprop_decl availabilities = Availability::UI;
    1035              :     cprop_decl redirect = AddNoteCommand(NoteName::B, NoteAddingMode::InsertChord);
    1036              : };
    1037              : 
    1038              : // accidental commands
    1039              : struct ToggleAccidentalCommand {
    1040              :     cprop_decl id = Command("command://notation/toggle-accidental");
    1041              :     cprop_decl title = MnemonicString("action", "Toggle accidental");
    1042              :     cprop_decl description = TranslatableString("action", "Toggle accidental");
    1043              :     cprop_decl availabilities = Availability::API;
    1044              : 
    1045              :     AccidentalType type = AccidentalType::NATURAL;
    1046              :     PlayMode playMode = PlayMode::PlayNote;
    1047              :     bool affectNoteInput = false;
    1048              : 
    1049              :     cprop_decl input = FieldsScheme {
    1050              :         Field{ "type", &ToggleAccidentalCommand::type, "Accidental type" },
    1051              :         Field{ "play-mode", &ToggleAccidentalCommand::playMode, "Play mode", Presence::Optional },
    1052              :         Field{ "affect-note-input", &ToggleAccidentalCommand::affectNoteInput, "Affect note input", Presence::Optional },
    1053              :     };
    1054              : };
    1055              : 
    1056              : // aliases for toggle accidental command
    1057              : struct ToggleFlat2Command {
    1058              :     cprop_decl id = Command("command://notation/toggle-flat2");
    1059              :     cprop_decl title = MnemonicString("action", "Toggle double-flat");
    1060              :     cprop_decl description = TranslatableString("action", "Toggle accidental: double-flat");
    1061              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::FLAT_DOUBLE);
    1062              :     cprop_decl availabilities = Availability::UI;
    1063              :     cprop_decl redirect = ToggleAccidentalCommand(AccidentalType::FLAT2, PlayMode::NoPlay, true);
    1064              : };
    1065              : 
    1066              : struct ToggleFlatCommand {
    1067              :     cprop_decl id = Command("command://notation/toggle-flat");
    1068              :     cprop_decl title = MnemonicString("action", "Toggle flat");
    1069              :     cprop_decl description = TranslatableString("action", "Toggle accidental: flat");
    1070              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::FLAT);
    1071              :     cprop_decl availabilities = Availability::UI;
    1072              :     cprop_decl redirect = ToggleAccidentalCommand(AccidentalType::FLAT, PlayMode::NoPlay, true);
    1073              : };
    1074              : 
    1075              : struct ToggleNaturalCommand {
    1076              :     cprop_decl id = Command("command://notation/toggle-natural");
    1077              :     cprop_decl title = MnemonicString("action", "Toggle natural");
    1078              :     cprop_decl description = TranslatableString("action", "Toggle accidental: natural");
    1079              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::NATURAL);
    1080              :     cprop_decl availabilities = Availability::UI;
    1081              :     cprop_decl redirect = ToggleAccidentalCommand(AccidentalType::NATURAL, PlayMode::NoPlay, true);
    1082              : };
    1083              : 
    1084              : struct ToggleSharpCommand {
    1085              :     cprop_decl id = Command("command://notation/toggle-sharp");
    1086              :     cprop_decl title = MnemonicString("action", "Toggle sharp");
    1087              :     cprop_decl description = TranslatableString("action", "Toggle accidental: sharp");
    1088              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::SHARP);
    1089              :     cprop_decl availabilities = Availability::UI;
    1090              :     cprop_decl redirect = ToggleAccidentalCommand(AccidentalType::SHARP, PlayMode::NoPlay, true);
    1091              : };
    1092              : 
    1093              : struct ToggleSharp2Command {
    1094              :     cprop_decl id = Command("command://notation/toggle-sharp2");
    1095              :     cprop_decl title = MnemonicString("action", "Toggle double-sharp");
    1096              :     cprop_decl description = TranslatableString("action", "Toggle accidental: double-sharp");
    1097              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::SHARP_DOUBLE);
    1098              :     cprop_decl availabilities = Availability::UI;
    1099              :     cprop_decl redirect = ToggleAccidentalCommand(AccidentalType::SHARP2, PlayMode::NoPlay, true);
    1100              : };
    1101              : 
    1102              : // voice commands
    1103              : struct UseVoiceCommand {
    1104              :     cprop_decl id = Command("command://notation/use-voice");
    1105              :     cprop_decl title = MnemonicString("action", "Voice");
    1106              :     cprop_decl description = TranslatableString("action", "Use voice");
    1107              :     cprop_decl availabilities = Availability::API;
    1108              :     cprop_decl annotations = Annotation::Idempotent;
    1109              : 
    1110              :     int voice = 0;   // voice number (1-4)!!, not index (0-3)
    1111              : 
    1112              :     cprop_decl input = FieldsScheme {
    1113              :         Field{ "voice", &UseVoiceCommand::voice, "Voice", 1, (int)engraving::MAX_VOICES },
    1114              :     };
    1115              : };
    1116              : 
    1117              : // aliases for use voice command
    1118              : 
    1119              : struct UseVoice1Command {
    1120              :     cprop_decl id = Command("command://notation/use-voice/1");
    1121              :     cprop_decl title = MnemonicString("action", "Voice 1");
    1122              :     cprop_decl description = TranslatableString("action", "Use voice 1");
    1123              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::VOICE_1);
    1124              :     cprop_decl availabilities = Availability::UI;
    1125              :     cprop_decl redirect = UseVoiceCommand(1);
    1126              : };
    1127              : 
    1128              : struct UseVoice2Command {
    1129              :     cprop_decl id = Command("command://notation/use-voice/2");
    1130              :     cprop_decl title = MnemonicString("action", "Voice 2");
    1131              :     cprop_decl description = TranslatableString("action", "Use voice 2");
    1132              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::VOICE_2);
    1133              :     cprop_decl availabilities = Availability::UI;
    1134              :     cprop_decl redirect = UseVoiceCommand(2);
    1135              : };
    1136              : 
    1137              : struct UseVoice3Command {
    1138              :     cprop_decl id = Command("command://notation/use-voice/3");
    1139              :     cprop_decl title = MnemonicString("action", "Voice 3");
    1140              :     cprop_decl description = TranslatableString("action", "Use voice 3");
    1141              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::VOICE_3);
    1142              :     cprop_decl availabilities = Availability::UI;
    1143              :     cprop_decl redirect = UseVoiceCommand(3);
    1144              : };
    1145              : 
    1146              : struct UseVoice4Command {
    1147              :     cprop_decl id = Command("command://notation/use-voice/4");
    1148              :     cprop_decl title = MnemonicString("action", "Voice 4");
    1149              :     cprop_decl description = TranslatableString("action", "Use voice 4");
    1150              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::VOICE_4);
    1151              :     cprop_decl availabilities = Availability::UI;
    1152              :     cprop_decl redirect = UseVoiceCommand(4);
    1153              : };
    1154              : 
    1155              : struct SwapVoicesCommand {
    1156              :     cprop_decl id = Command("command://notation/swap-voices");
    1157              :     cprop_decl title = MnemonicString("action", "Swap voices");
    1158              :     cprop_decl description = TranslatableString("action", "Swap two voices");
    1159              :     cprop_decl availabilities = Availability::API;
    1160              :     cprop_decl annotations = Annotation::None;
    1161              : 
    1162              :     int voiceA = 0; // voice number (1-4)!!, not index (0-3)
    1163              :     int voiceB = 0; // voice number (1-4)!!, not index (0-3)
    1164              : 
    1165              :     cprop_decl input = FieldsScheme {
    1166              :         Field{ "voice-a", &SwapVoicesCommand::voiceA, "First of the two voices to swap", 1, (int)engraving::MAX_VOICES },
    1167              :         Field{ "voice-b", &SwapVoicesCommand::voiceB, "Second of the two voices to swap", 1, (int)engraving::MAX_VOICES },
    1168              :     };
    1169              : };
    1170              : 
    1171              : // aliases for swap voices command
    1172              : 
    1173              : struct SwapVoice12Command {
    1174              :     cprop_decl id = Command("command://notation/swap-voices/1-2");
    1175              :     cprop_decl title = MnemonicString("action", "Exchange voice &1-2");
    1176              :     cprop_decl description = TranslatableString("action", "Exchange voice 1-2");
    1177              :     cprop_decl availabilities = Availability::UI;
    1178              :     cprop_decl annotations = Annotation::None;
    1179              :     cprop_decl redirect = SwapVoicesCommand(1, 2);
    1180              : };
    1181              : 
    1182              : struct SwapVoice13Command {
    1183              :     cprop_decl id = Command("command://notation/swap-voices/1-3");
    1184              :     cprop_decl title = MnemonicString("action", "Exchange voice 1-3");
    1185              :     cprop_decl description = TranslatableString("action", "Exchange voice 1-3");
    1186              :     cprop_decl availabilities = Availability::UI;
    1187              :     cprop_decl annotations = Annotation::None;
    1188              :     cprop_decl redirect = SwapVoicesCommand(1, 3);
    1189              : };
    1190              : 
    1191              : struct SwapVoice14Command {
    1192              :     cprop_decl id = Command("command://notation/swap-voices/1-4");
    1193              :     cprop_decl title = MnemonicString("action", "Exchange voice 1-&4");
    1194              :     cprop_decl description = TranslatableString("action", "Exchange voice 1-4");
    1195              :     cprop_decl availabilities = Availability::UI;
    1196              :     cprop_decl annotations = Annotation::None;
    1197              :     cprop_decl redirect = SwapVoicesCommand(1, 4);
    1198              : };
    1199              : 
    1200              : struct SwapVoice23Command {
    1201              :     cprop_decl id = Command("command://notation/swap-voices/2-3");
    1202              :     cprop_decl title = MnemonicString("action", "Exchange voice &2-3");
    1203              :     cprop_decl description = TranslatableString("action", "Exchange voice 2-3");
    1204              :     cprop_decl availabilities = Availability::UI;
    1205              :     cprop_decl annotations = Annotation::None;
    1206              :     cprop_decl redirect = SwapVoicesCommand(2, 3);
    1207              : };
    1208              : 
    1209              : struct SwapVoice24Command {
    1210              :     cprop_decl id = Command("command://notation/swap-voices/2-4");
    1211              :     cprop_decl title = MnemonicString("action", "Exchange voice 2-4");
    1212              :     cprop_decl description = TranslatableString("action", "Exchange voice 2-4");
    1213              :     cprop_decl availabilities = Availability::UI;
    1214              :     cprop_decl annotations = Annotation::None;
    1215              :     cprop_decl redirect = SwapVoicesCommand(2, 4);
    1216              : };
    1217              : 
    1218              : struct SwapVoice34Command {
    1219              :     cprop_decl id = Command("command://notation/swap-voices/3-4");
    1220              :     cprop_decl title = MnemonicString("action", "Exchange voice &3-4");
    1221              :     cprop_decl description = TranslatableString("action", "Exchange voice 3-4");
    1222              :     cprop_decl availabilities = Availability::UI;
    1223              :     cprop_decl annotations = Annotation::None;
    1224              :     cprop_decl redirect = SwapVoicesCommand(3, 4);
    1225              : };
    1226              : 
    1227              : // tuplet commands
    1228              : struct AddTupletCommand {
    1229              :     cprop_decl id = Command("command://notation/add-tuplet");
    1230              :     cprop_decl title = MnemonicString("action", "Tuplet");
    1231              :     cprop_decl description = TranslatableString("action", "Add tuplet");
    1232              :     cprop_decl availabilities = Availability::API;
    1233              : 
    1234              :     std::string ratio;   // Fraction as string (e.g. "3/2", "4/3", "5/4", "6/5", "7/6", "8/7", "9/8")
    1235              :     TupletNumberType numberType = TupletNumberType::DEFAULT;
    1236              :     TupletBracketType bracketType = TupletBracketType::DEFAULT;
    1237              :     bool autoBaseLen = true;
    1238              :     TupletSelectedDuration selectedDurationAs = TupletSelectedDuration::DEFAULT;
    1239              : 
    1240              :     cprop_decl input = FieldsScheme {
    1241              :         Field{ "ratio", &AddTupletCommand::ratio, "Tuplet ratio (e.g. 3/2, 4/3, 5/4, 6/5, 7/6, 8/7, 9/8)" },
    1242              :         Field{ "number-type", &AddTupletCommand::numberType, "Tuplet number type", Presence::Optional },
    1243              :         Field{ "bracket-type", &AddTupletCommand::bracketType, "Tuplet bracket type", Presence::Optional },
    1244              :         Field{ "auto-baselen", &AddTupletCommand::autoBaseLen, "Auto base length", Presence::Optional },
    1245              :         Field{ "selected-duration-as", &AddTupletCommand::selectedDurationAs, "Use selected duration as subdivision or tuplet-length",
    1246              :                Presence::Optional },
    1247              :     };
    1248              : 
    1249            0 :     AddTupletCommand() = default;
    1250          168 :     AddTupletCommand(int tupletCount)
    1251          168 :         : ratio(std::to_string(tupletCount) + "/2") {}
    1252              : };
    1253              : 
    1254              : // aliases for add tuplet command
    1255              : struct AddDupletCommand {
    1256              :     cprop_decl id = Command("command://notation/add-tuplet/duplet");
    1257              :     cprop_decl title = MnemonicString("action", "Duplet");
    1258              :     cprop_decl description = TranslatableString("action", "Add duplet");
    1259              :     cprop_decl availabilities = Availability::UI;
    1260              :     cprop_decl redirect = AddTupletCommand(2);
    1261              : };
    1262              : 
    1263              : struct AddTripletCommand {
    1264              :     cprop_decl id = Command("command://notation/add-tuplet/triplet");
    1265              :     cprop_decl title = MnemonicString("action", "Triplet");
    1266              :     cprop_decl description = TranslatableString("action", "Add triplet");
    1267              :     cprop_decl availabilities = Availability::UI;
    1268              :     cprop_decl redirect = AddTupletCommand(3);
    1269              : };
    1270              : 
    1271              : struct AddQuadrupletCommand {
    1272              :     cprop_decl id = Command("command://notation/add-tuplet/quadruplet");
    1273              :     cprop_decl title = MnemonicString("action", "Quadruplet");
    1274              :     cprop_decl description = TranslatableString("action", "Add quadruplet");
    1275              :     cprop_decl availabilities = Availability::UI;
    1276              :     cprop_decl redirect = AddTupletCommand(4);
    1277              : };
    1278              : 
    1279              : struct AddQuintupletCommand {
    1280              :     cprop_decl id = Command("command://notation/add-tuplet/quintuplet");
    1281              :     cprop_decl title = MnemonicString("action", "Quintuplet");
    1282              :     cprop_decl description = TranslatableString("action", "Add quintuplet");
    1283              :     cprop_decl availabilities = Availability::UI;
    1284              :     cprop_decl redirect = AddTupletCommand(5);
    1285              : };
    1286              : 
    1287              : struct AddSextupletCommand {
    1288              :     cprop_decl id = Command("command://notation/add-tuplet/sextuplet");
    1289              :     cprop_decl title = MnemonicString("action", "Sextuplet");
    1290              :     cprop_decl description = TranslatableString("action", "Add sextuplet");
    1291              :     cprop_decl availabilities = Availability::UI;
    1292              :     cprop_decl redirect = AddTupletCommand(6);
    1293              : };
    1294              : 
    1295              : struct AddSeptupletCommand {
    1296              :     cprop_decl id = Command("command://notation/add-tuplet/septuplet");
    1297              :     cprop_decl title = MnemonicString("action", "Septuplet");
    1298              :     cprop_decl description = TranslatableString("action", "Add septuplet");
    1299              :     cprop_decl availabilities = Availability::UI;
    1300              :     cprop_decl redirect = AddTupletCommand(7);
    1301              : };
    1302              : 
    1303              : struct AddOctupletCommand {
    1304              :     cprop_decl id = Command("command://notation/add-tuplet/octuplet");
    1305              :     cprop_decl title = MnemonicString("action", "Octuplet");
    1306              :     cprop_decl description = TranslatableString("action", "Add octuplet");
    1307              :     cprop_decl availabilities = Availability::UI;
    1308              :     cprop_decl redirect = AddTupletCommand(8);
    1309              : };
    1310              : 
    1311              : struct AddNonupletCommand {
    1312              :     cprop_decl id = Command("command://notation/add-tuplet/nonuplet");
    1313              :     cprop_decl title = MnemonicString("action", "Nonuplet");
    1314              :     cprop_decl description = TranslatableString("action", "Add nonuplet");
    1315              :     cprop_decl availabilities = Availability::UI;
    1316              :     cprop_decl redirect = AddTupletCommand(9);
    1317              : };
    1318              : 
    1319              : struct OpenTupletConfigureCommand {
    1320              :     cprop_decl id = Command("command://notation/open-tuplet-configure");
    1321              :     cprop_decl title = MnemonicString("action", "Othe&r…");
    1322              :     cprop_decl description = TranslatableString("action", "Show tuplet configure");
    1323              :     cprop_decl availabilities = Availability::UI;
    1324              : };
    1325              : 
    1326              : struct AddBoxesCommand {
    1327              :     cprop_decl id = Command("command://notation/add-boxes");
    1328              :     cprop_decl title = MnemonicString("action", "Add boxes");
    1329              :     cprop_decl description = TranslatableString("action", "Add boxes");
    1330              :     cprop_decl availabilities = Availability::API;
    1331              : 
    1332              :     BoxType boxType = BoxType::Unknown;
    1333              :     AddBoxesTarget target = AddBoxesTarget::BeforeSelection;
    1334              :     int count = 1;
    1335              :     bool needInputCount = false;
    1336              : 
    1337              :     cprop_decl input = FieldsScheme {
    1338              :         Field{ "type", &AddBoxesCommand::boxType, "Box type" },
    1339              :         Field{ "target", &AddBoxesCommand::target, "Target" },
    1340              :         Field{ "count", &AddBoxesCommand::count, "Count", Presence::Optional },
    1341              :         Field{ "need-input-count", &AddBoxesCommand::needInputCount, "Need input count (interactive mode)", Presence::Optional },
    1342              :     };
    1343              : 
    1344              :     AddBoxesCommand() = default;
    1345          294 :     AddBoxesCommand(BoxType boxType, AddBoxesTarget target, int count = 1, bool needInputCount = false)
    1346          294 :         : boxType(boxType), target(target), count(count), needInputCount(needInputCount) {}
    1347              : };
    1348              : 
    1349              : // aliases for add boxes command
    1350              : 
    1351              : struct InsertHBoxCommand {
    1352              :     cprop_decl id = Command("command://notation/insert-hbox");
    1353              :     cprop_decl title = MnemonicString("action", "Insert &horizontal frame");
    1354              :     cprop_decl description = TranslatableString("action", "Insert horizontal frame");
    1355              :     cprop_decl availabilities = Availability::UI;
    1356              :     cprop_decl redirect = AddBoxesCommand(BoxType::Horizontal, AddBoxesTarget::BeforeSelection);
    1357              : };
    1358              : 
    1359              : struct InsertVBoxCommand {
    1360              :     cprop_decl id = Command("command://notation/insert-vbox");
    1361              :     cprop_decl title = MnemonicString("action", "Insert &vertical frame");
    1362              :     cprop_decl description = TranslatableString("action", "Insert vertical frame");
    1363              :     cprop_decl availabilities = Availability::UI;
    1364              :     cprop_decl redirect = AddBoxesCommand(BoxType::Vertical, AddBoxesTarget::BeforeSelection);
    1365              : };
    1366              : 
    1367              : struct InsertTextFrameCommand {
    1368              :     cprop_decl id = Command("command://notation/insert-textframe");
    1369              :     cprop_decl title = MnemonicString("action", "Insert &text frame");
    1370              :     cprop_decl description = TranslatableString("action", "Insert text frame");
    1371              :     cprop_decl availabilities = Availability::UI;
    1372              :     cprop_decl redirect = AddBoxesCommand(BoxType::Text, AddBoxesTarget::BeforeSelection);
    1373              : };
    1374              : 
    1375              : struct InsertFretFrameCommand {
    1376              :     cprop_decl id = Command("command://notation/insert-fretframe");
    1377              :     cprop_decl title = MnemonicString("action", "Insert &fretboard diagram legend");
    1378              :     cprop_decl description = TranslatableString("action", "Insert fretboard diagram legend");
    1379              :     cprop_decl availabilities = Availability::UI;
    1380              :     cprop_decl redirect = AddBoxesCommand(BoxType::Fret, AddBoxesTarget::BeforeSelection);
    1381              : };
    1382              : 
    1383              : struct AppendHBoxCommand {
    1384              :     cprop_decl id = Command("command://notation/append-hbox");
    1385              :     cprop_decl title = MnemonicString("action", "&Horizontal frame");
    1386              :     cprop_decl description = TranslatableString("action", "Insert horizontal frame at end of score");
    1387              :     cprop_decl availabilities = Availability::UI;
    1388              :     cprop_decl redirect = AddBoxesCommand(BoxType::Horizontal, AddBoxesTarget::AtEndOfScore);
    1389              : };
    1390              : 
    1391              : struct AppendVBoxCommand {
    1392              :     cprop_decl id = Command("command://notation/append-vbox");
    1393              :     cprop_decl title = MnemonicString("action", "&Vertical frame");
    1394              :     cprop_decl description = TranslatableString("action", "Insert vertical frame at end of score");
    1395              :     cprop_decl availabilities = Availability::UI;
    1396              :     cprop_decl redirect = AddBoxesCommand(BoxType::Vertical, AddBoxesTarget::AtEndOfScore);
    1397              : };
    1398              : 
    1399              : struct AppendTextFrameCommand {
    1400              :     cprop_decl id = Command("command://notation/append-textframe");
    1401              :     cprop_decl title = MnemonicString("action", "&Text frame");
    1402              :     cprop_decl description = TranslatableString("action", "Insert text frame at end of score");
    1403              :     cprop_decl availabilities = Availability::UI;
    1404              :     cprop_decl redirect = AddBoxesCommand(BoxType::Text, AddBoxesTarget::AtEndOfScore);
    1405              : };
    1406              : 
    1407              : struct AppendFretFrameCommand {
    1408              :     cprop_decl id = Command("command://notation/append-fretframe");
    1409              :     cprop_decl title = MnemonicString("action", "&Fretboard diagram legend");
    1410              :     cprop_decl description = TranslatableString("action", "Insert fretboard diagram legend at end of score");
    1411              :     cprop_decl availabilities = Availability::UI;
    1412              :     cprop_decl redirect = AddBoxesCommand(BoxType::Fret, AddBoxesTarget::AtEndOfScore);
    1413              : };
    1414              : 
    1415              : struct InsertMeasureCommand {
    1416              :     cprop_decl id = Command("command://notation/insert-measure");
    1417              :     cprop_decl title = MnemonicString("action", "&Insert one measure before selection");
    1418              :     cprop_decl description = TranslatableString("action", "Insert one measure before selection");
    1419              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::INSERT_ONE_MEASURE);
    1420              :     cprop_decl availabilities = Availability::UI;
    1421              :     cprop_decl redirect = AddBoxesCommand(BoxType::Measure, AddBoxesTarget::BeforeSelection);
    1422              : };
    1423              : 
    1424              : struct AppendMeasureCommand {
    1425              :     cprop_decl id = Command("command://notation/append-measure");
    1426              :     cprop_decl title = MnemonicString("action", "Insert &one measure at end of score");
    1427              :     cprop_decl description = TranslatableString("action", "Insert one measure at end of score");
    1428              :     cprop_decl availabilities = Availability::UI;
    1429              :     cprop_decl redirect = AddBoxesCommand(BoxType::Measure, AddBoxesTarget::AtEndOfScore);
    1430              : };
    1431              : 
    1432              : struct InsertMeasuresAfterSelectionCommand {
    1433              :     cprop_decl id = Command("command://notation/insert-measures-after-selection");
    1434              :     cprop_decl title = MnemonicString("action", "Insert &after selection…");
    1435              :     cprop_decl description = TranslatableString("action", "Insert measures after selection");
    1436              :     cprop_decl availabilities = Availability::UI;
    1437              :     cprop_decl redirect = AddBoxesCommand(BoxType::Measure, AddBoxesTarget::AfterSelection, -1, true);
    1438              : };
    1439              : 
    1440              : struct InsertMeasuresAtStartOfScoreCommand {
    1441              :     cprop_decl id = Command("command://notation/insert-measures-at-start-of-score");
    1442              :     cprop_decl title = MnemonicString("action", "Insert at &start of score…");
    1443              :     cprop_decl description = TranslatableString("action", "Insert measures at start of score");
    1444              :     cprop_decl availabilities = Availability::UI;
    1445              :     cprop_decl redirect = AddBoxesCommand(BoxType::Measure, AddBoxesTarget::AtStartOfScore, -1, true);
    1446              : };
    1447              : 
    1448              : struct InsertMeasuresCommand {
    1449              :     cprop_decl id = Command("command://notation/insert-measures");
    1450              :     cprop_decl title = MnemonicString("action", "Insert &before selection…");
    1451              :     cprop_decl description = TranslatableString("action", "Insert measures before selection");
    1452              :     cprop_decl availabilities = Availability::UI;
    1453              :     cprop_decl redirect = AddBoxesCommand(BoxType::Measure, AddBoxesTarget::BeforeSelection, -1, true);
    1454              : };
    1455              : 
    1456              : struct AppendMeasuresCommand {
    1457              :     cprop_decl id = Command("command://notation/append-measures");
    1458              :     cprop_decl title = MnemonicString("action", "Insert at &end of score…");
    1459              :     cprop_decl description = TranslatableString("action", "Insert measures at end of score");
    1460              :     cprop_decl availabilities = Availability::UI;
    1461              :     cprop_decl redirect = AddBoxesCommand(BoxType::Measure, AddBoxesTarget::AtEndOfScore, -1, true);
    1462              : };
    1463              : 
    1464              : // add grace notes commands
    1465              : struct AddGraceNoteCommand {
    1466              :     cprop_decl id = Command("command://notation/add-grace-note");
    1467              :     cprop_decl title = MnemonicString("action", "Add grace note");
    1468              :     cprop_decl description = TranslatableString("action", "Add grace note");
    1469              :     cprop_decl availabilities = Availability::API;
    1470              : 
    1471              :     GraceNoteType type = GraceNoteType::NORMAL;
    1472              : 
    1473              :     cprop_decl input = FieldsScheme {
    1474              :         Field{ "type", &AddGraceNoteCommand::type, "Grace note type" },
    1475              :     };
    1476              : };
    1477              : 
    1478              : // aliases for add grace notes command
    1479              : 
    1480              : struct AddAcciaccaturaCommand {
    1481              :     cprop_decl id = Command("command://notation/add-grace-note/acciaccatura");
    1482              :     cprop_decl title = MnemonicString("action", "Acciaccatura");
    1483              :     cprop_decl description = TranslatableString("action", "Add grace note: acciaccatura");
    1484              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::ACCIACCATURA);
    1485              :     cprop_decl availabilities = Availability::UI;
    1486              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::ACCIACCATURA);
    1487              : };
    1488              : 
    1489              : struct AddAppoggiaturaCommand {
    1490              :     cprop_decl id = Command("command://notation/add-grace-note/appoggiatura");
    1491              :     cprop_decl title = MnemonicString("action", "Appoggiatura");
    1492              :     cprop_decl description = TranslatableString("action", "Add grace note: appoggiatura");
    1493              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::APPOGGIATURA);
    1494              :     cprop_decl availabilities = Availability::UI;
    1495              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::APPOGGIATURA);
    1496              : };
    1497              : 
    1498              : struct AddGrace4Command {
    1499              :     cprop_decl id = Command("command://notation/add-grace-note/grace4");
    1500              :     cprop_decl title = MnemonicString("action", "Grace: quarter");
    1501              :     cprop_decl description = TranslatableString("action", "Add grace note: quarter");
    1502              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::GRACE4);
    1503              :     cprop_decl availabilities = Availability::UI;
    1504              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::GRACE4);
    1505              : };
    1506              : 
    1507              : struct AddGrace16Command {
    1508              :     cprop_decl id = Command("command://notation/add-grace-note/grace16");
    1509              :     cprop_decl title = MnemonicString("action", "Grace: 16th");
    1510              :     cprop_decl description = TranslatableString("action", "Add grace note: 16th");
    1511              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::GRACE16);
    1512              :     cprop_decl availabilities = Availability::UI;
    1513              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::GRACE16);
    1514              : };
    1515              : 
    1516              : struct AddGrace32Command {
    1517              :     cprop_decl id = Command("command://notation/add-grace-note/grace32");
    1518              :     cprop_decl title = MnemonicString("action", "Grace: 32nd");
    1519              :     cprop_decl description = TranslatableString("action", "Add grace note: 32nd");
    1520              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::GRACE32);
    1521              :     cprop_decl availabilities = Availability::UI;
    1522              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::GRACE32);
    1523              : };
    1524              : 
    1525              : struct AddGrace8AfterCommand {
    1526              :     cprop_decl id = Command("command://notation/add-grace-note/grace8-after");
    1527              :     cprop_decl title = MnemonicString("action", "Grace: 8th after");
    1528              :     cprop_decl description = TranslatableString("action", "Add grace note: eighth after");
    1529              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::GRACE8_AFTER);
    1530              :     cprop_decl availabilities = Availability::UI;
    1531              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::GRACE8_AFTER);
    1532              : };
    1533              : 
    1534              : struct AddGrace16AfterCommand {
    1535              :     cprop_decl id = Command("command://notation/add-grace-note/grace16-after");
    1536              :     cprop_decl title = MnemonicString("action", "Grace: 16th after");
    1537              :     cprop_decl description = TranslatableString("action", "Add grace note: 16th after");
    1538              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::GRACE16_AFTER);
    1539              :     cprop_decl availabilities = Availability::UI;
    1540              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::GRACE16_AFTER);
    1541              : };
    1542              : 
    1543              : struct AddGrace32AfterCommand {
    1544              :     cprop_decl id = Command("command://notation/add-grace-note/grace32-after");
    1545              :     cprop_decl title = MnemonicString("action", "Grace: 32nd after");
    1546              :     cprop_decl description = TranslatableString("action", "Add grace note: 32nd after");
    1547              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::GRACE32_AFTER);
    1548              :     cprop_decl availabilities = Availability::UI;
    1549              :     cprop_decl redirect = AddGraceNoteCommand(GraceNoteType::GRACE32_AFTER);
    1550              : };
    1551              : 
    1552              : struct AddIntervalCommand {
    1553              :     cprop_decl id = Command("command://notation/add-interval");
    1554              :     cprop_decl title = MnemonicString("action", "Add interval");
    1555              :     cprop_decl description = TranslatableString("action", "Add interval");
    1556              :     cprop_decl availabilities = Availability::API;
    1557              : 
    1558              :     int interval = 0;
    1559              : 
    1560              :     cprop_decl input = FieldsScheme {
    1561              :         Field{ "interval", &AddIntervalCommand::interval, "Interval from -10 to 10, excluding 0 and -1", -10, 10 },
    1562              :     };
    1563              : };
    1564              : 
    1565              : // interval commands
    1566              : 
    1567              : struct AddInterval1Command {
    1568              :     cprop_decl id = Command("command://notation/add-interval/1");
    1569              :     cprop_decl title = MnemonicString("action", "&Unison");
    1570              :     cprop_decl description = TranslatableString("action", "Enter interval: unison");
    1571              :     cprop_decl availabilities = Availability::UI;
    1572              :     cprop_decl redirect = AddIntervalCommand(1);
    1573              : };
    1574              : 
    1575              : struct AddInterval2Command {
    1576              :     cprop_decl id = Command("command://notation/add-interval/2");
    1577              :     cprop_decl title = MnemonicString("action", "Se&cond above");
    1578              :     cprop_decl description = TranslatableString("action", "Enter interval: second above");
    1579              :     cprop_decl availabilities = Availability::UI;
    1580              :     cprop_decl redirect = AddIntervalCommand(2);
    1581              : };
    1582              : 
    1583              : struct AddInterval3Command {
    1584              :     cprop_decl id = Command("command://notation/add-interval/3");
    1585              :     cprop_decl title = MnemonicString("action", "Thir&d above");
    1586              :     cprop_decl description = TranslatableString("action", "Enter interval: third above");
    1587              :     cprop_decl availabilities = Availability::UI;
    1588              :     cprop_decl redirect = AddIntervalCommand(3);
    1589              : };
    1590              : 
    1591              : struct AddInterval4Command {
    1592              :     cprop_decl id = Command("command://notation/add-interval/4");
    1593              :     cprop_decl title = MnemonicString("action", "Fou&rth above");
    1594              :     cprop_decl description = TranslatableString("action", "Enter interval: fourth above");
    1595              :     cprop_decl availabilities = Availability::UI;
    1596              :     cprop_decl redirect = AddIntervalCommand(4);
    1597              : };
    1598              : 
    1599              : struct AddInterval5Command {
    1600              :     cprop_decl id = Command("command://notation/add-interval/5");
    1601              :     cprop_decl title = MnemonicString("action", "Fift&h above");
    1602              :     cprop_decl description = TranslatableString("action", "Enter interval: fifth above");
    1603              :     cprop_decl availabilities = Availability::UI;
    1604              :     cprop_decl redirect = AddIntervalCommand(5);
    1605              : };
    1606              : 
    1607              : struct AddInterval6Command {
    1608              :     cprop_decl id = Command("command://notation/add-interval/6");
    1609              :     cprop_decl title = MnemonicString("action", "Si&xth above");
    1610              :     cprop_decl description = TranslatableString("action", "Enter interval: sixth above");
    1611              :     cprop_decl availabilities = Availability::UI;
    1612              :     cprop_decl redirect = AddIntervalCommand(6);
    1613              : };
    1614              : 
    1615              : struct AddInterval7Command {
    1616              :     cprop_decl id = Command("command://notation/add-interval/7");
    1617              :     cprop_decl title = MnemonicString("action", "Seve&nth above");
    1618              :     cprop_decl description = TranslatableString("action", "Enter interval: seventh above");
    1619              :     cprop_decl availabilities = Availability::UI;
    1620              :     cprop_decl redirect = AddIntervalCommand(7);
    1621              : };
    1622              : 
    1623              : struct AddInterval8Command {
    1624              :     cprop_decl id = Command("command://notation/add-interval/8");
    1625              :     cprop_decl title = MnemonicString("action", "Octave &above");
    1626              :     cprop_decl description = TranslatableString("action", "Enter interval: octave above");
    1627              :     cprop_decl availabilities = Availability::UI;
    1628              :     cprop_decl redirect = AddIntervalCommand(8);
    1629              : };
    1630              : 
    1631              : struct AddInterval9Command {
    1632              :     cprop_decl id = Command("command://notation/add-interval/9");
    1633              :     cprop_decl title = MnemonicString("action", "Ninth abov&e");
    1634              :     cprop_decl description = TranslatableString("action", "Enter interval: ninth above");
    1635              :     cprop_decl availabilities = Availability::UI;
    1636              :     cprop_decl redirect = AddIntervalCommand(9);
    1637              : };
    1638              : 
    1639              : struct AddInterval10Command {
    1640              :     cprop_decl id = Command("command://notation/add-interval/10");
    1641              :     cprop_decl title = MnemonicString("action", "Tenth above");
    1642              :     cprop_decl description = TranslatableString("action", "Enter interval: tenth above");
    1643              :     cprop_decl availabilities = Availability::UI;
    1644              :     cprop_decl redirect = AddIntervalCommand(10);
    1645              : };
    1646              : 
    1647              : struct AddIntervalMinus2Command {
    1648              :     cprop_decl id = Command("command://notation/add-interval/-2");
    1649              :     cprop_decl title = MnemonicString("action", "&Second below");
    1650              :     cprop_decl description = TranslatableString("action", "Enter interval: second below");
    1651              :     cprop_decl availabilities = Availability::UI;
    1652              :     cprop_decl redirect = AddIntervalCommand(-2);
    1653              : };
    1654              : 
    1655              : struct AddIntervalMinus3Command {
    1656              :     cprop_decl id = Command("command://notation/add-interval/-3");
    1657              :     cprop_decl title = MnemonicString("action", "&Third below");
    1658              :     cprop_decl description = TranslatableString("action", "Enter interval: third below");
    1659              :     cprop_decl availabilities = Availability::UI;
    1660              :     cprop_decl redirect = AddIntervalCommand(-3);
    1661              : };
    1662              : 
    1663              : struct AddIntervalMinus4Command {
    1664              :     cprop_decl id = Command("command://notation/add-interval/-4");
    1665              :     cprop_decl title = MnemonicString("action", "F&ourth below");
    1666              :     cprop_decl description = TranslatableString("action", "Enter interval: fourth below");
    1667              :     cprop_decl availabilities = Availability::UI;
    1668              :     cprop_decl redirect = AddIntervalCommand(-4);
    1669              : };
    1670              : 
    1671              : struct AddIntervalMinus5Command {
    1672              :     cprop_decl id = Command("command://notation/add-interval/-5");
    1673              :     cprop_decl title = MnemonicString("action", "&Fifth below");
    1674              :     cprop_decl description = TranslatableString("action", "Enter interval: fifth below");
    1675              :     cprop_decl availabilities = Availability::UI;
    1676              :     cprop_decl redirect = AddIntervalCommand(-5);
    1677              : };
    1678              : 
    1679              : struct AddIntervalMinus6Command {
    1680              :     cprop_decl id = Command("command://notation/add-interval/-6");
    1681              :     cprop_decl title = MnemonicString("action", "S&ixth below");
    1682              :     cprop_decl description = TranslatableString("action", "Enter interval: sixth below");
    1683              :     cprop_decl availabilities = Availability::UI;
    1684              :     cprop_decl redirect = AddIntervalCommand(-6);
    1685              : };
    1686              : 
    1687              : struct AddIntervalMinus7Command {
    1688              :     cprop_decl id = Command("command://notation/add-interval/-7");
    1689              :     cprop_decl title = MnemonicString("action", "Se&venth below");
    1690              :     cprop_decl description = TranslatableString("action", "Enter interval: seventh below");
    1691              :     cprop_decl availabilities = Availability::UI;
    1692              :     cprop_decl redirect = AddIntervalCommand(-7);
    1693              : };
    1694              : 
    1695              : struct AddIntervalMinus8Command {
    1696              :     cprop_decl id = Command("command://notation/add-interval/-8");
    1697              :     cprop_decl title = MnemonicString("action", "Octave &below");
    1698              :     cprop_decl description = TranslatableString("action", "Enter interval: octave below");
    1699              :     cprop_decl availabilities = Availability::UI;
    1700              :     cprop_decl redirect = AddIntervalCommand(-8);
    1701              : };
    1702              : 
    1703              : struct AddIntervalMinus9Command {
    1704              :     cprop_decl id = Command("command://notation/add-interval/-9");
    1705              :     cprop_decl title = MnemonicString("action", "Ninth belo&w");
    1706              :     cprop_decl description = TranslatableString("action", "Enter interval: ninth below");
    1707              :     cprop_decl availabilities = Availability::UI;
    1708              :     cprop_decl redirect = AddIntervalCommand(-9);
    1709              : };
    1710              : 
    1711              : struct AddIntervalMinus10Command {
    1712              :     cprop_decl id = Command("command://notation/add-interval/-10");
    1713              :     cprop_decl title = MnemonicString("action", "Tenth below");
    1714              :     cprop_decl description = TranslatableString("action", "Enter interval: tenth below");
    1715              :     cprop_decl availabilities = Availability::UI;
    1716              :     cprop_decl redirect = AddIntervalCommand(-10);
    1717              : };
    1718              : 
    1719              : struct AddTextCommand {
    1720              :     cprop_decl id = Command("command://notation/add-text");
    1721              :     cprop_decl title = MnemonicString("action", "Add text");
    1722              :     cprop_decl description = TranslatableString("action", "Add text");
    1723              :     cprop_decl availabilities = Availability::API;
    1724              : 
    1725              :     TextStyleType type = TextStyleType::DEFAULT;
    1726              : 
    1727              :     cprop_decl input = FieldsScheme {
    1728              :         Field{ "type", &AddTextCommand::type, "Text style type" },
    1729              :     };
    1730              : };
    1731              : 
    1732              : // aliases for add text command
    1733              : 
    1734              : struct AddTitleTextCommand {
    1735              :     cprop_decl id = Command("command://notation/add-text/title");
    1736              :     cprop_decl title = MnemonicString("action", "&Title");
    1737              :     cprop_decl description = TranslatableString("action", "Add text: title");
    1738              :     cprop_decl availabilities = Availability::UI;
    1739              :     cprop_decl redirect = AddTextCommand(TextStyleType::TITLE);
    1740              : };
    1741              : 
    1742              : struct AddSubtitleTextCommand {
    1743              :     cprop_decl id = Command("command://notation/add-text/subtitle");
    1744              :     cprop_decl title = MnemonicString("action", "&Subtitle");
    1745              :     cprop_decl description = TranslatableString("action", "Add text: subtitle");
    1746              :     cprop_decl availabilities = Availability::UI;
    1747              :     cprop_decl redirect = AddTextCommand(TextStyleType::SUBTITLE);
    1748              : };
    1749              : 
    1750              : struct AddComposerTextCommand {
    1751              :     cprop_decl id = Command("command://notation/add-text/composer");
    1752              :     cprop_decl title = MnemonicString("action", "&Composer");
    1753              :     cprop_decl description = TranslatableString("action", "Add text: composer");
    1754              :     cprop_decl availabilities = Availability::UI;
    1755              :     cprop_decl redirect = AddTextCommand(TextStyleType::COMPOSER);
    1756              : };
    1757              : 
    1758              : struct AddLyricistTextCommand {
    1759              :     cprop_decl id = Command("command://notation/add-text/lyricist");
    1760              :     cprop_decl title = MnemonicString("action", "&Lyricist");
    1761              :     cprop_decl description = TranslatableString("action", "Add text: lyricist");
    1762              :     cprop_decl availabilities = Availability::UI;
    1763              :     cprop_decl redirect = AddTextCommand(TextStyleType::LYRICIST);
    1764              : };
    1765              : 
    1766              : struct AddPartTextCommand {
    1767              :     cprop_decl id = Command("command://notation/add-text/part-name");
    1768              :     cprop_decl title = MnemonicString("action", "&Part name");
    1769              :     cprop_decl description = TranslatableString("action", "Add text: part name");
    1770              :     cprop_decl availabilities = Availability::UI;
    1771              :     cprop_decl redirect = AddTextCommand(TextStyleType::INSTRUMENT_EXCERPT);
    1772              : };
    1773              : 
    1774              : struct AddFrameTextCommand {
    1775              :     cprop_decl id = Command("command://notation/add-text/frame");
    1776              :     cprop_decl title = MnemonicString("action", "Text");
    1777              :     cprop_decl description = TranslatableString("action", "Add frame text");
    1778              :     cprop_decl availabilities = Availability::UI;
    1779              :     cprop_decl redirect = AddTextCommand(TextStyleType::FRAME);
    1780              : };
    1781              : 
    1782              : struct AddSystemTextCommand {
    1783              :     cprop_decl id = Command("command://notation/add-text/system");
    1784              :     cprop_decl title = MnemonicString("action", "Syst&em text");
    1785              :     cprop_decl description = TranslatableString("action", "Add text: system text");
    1786              :     cprop_decl availabilities = Availability::UI;
    1787              :     cprop_decl redirect = AddTextCommand(TextStyleType::SYSTEM);
    1788              : };
    1789              : 
    1790              : struct AddStaffTextCommand {
    1791              :     cprop_decl id = Command("command://notation/add-text/staff");
    1792              :     cprop_decl title = MnemonicString("action", "St&aff text");
    1793              :     cprop_decl description = TranslatableString("action", "Add text: staff text");
    1794              :     cprop_decl availabilities = Availability::UI;
    1795              :     cprop_decl redirect = AddTextCommand(TextStyleType::STAFF);
    1796              : };
    1797              : 
    1798              : struct AddExpressionTextCommand {
    1799              :     cprop_decl id = Command("command://notation/add-text/expression");
    1800              :     cprop_decl title = MnemonicString("action", "E&xpression text");
    1801              :     cprop_decl description = TranslatableString("action", "Add text: expression text");
    1802              :     cprop_decl availabilities = Availability::UI;
    1803              :     cprop_decl redirect = AddTextCommand(TextStyleType::EXPRESSION);
    1804              : };
    1805              : 
    1806              : struct AddRehearsalMarkTextCommand {
    1807              :     cprop_decl id = Command("command://notation/add-rehearsalmark");
    1808              :     cprop_decl title = MnemonicString("action", "&Rehearsal mark");
    1809              :     cprop_decl description = TranslatableString("action", "Add text: rehearsal mark");
    1810              :     cprop_decl availabilities = Availability::UI;
    1811              :     cprop_decl redirect = AddTextCommand(TextStyleType::REHEARSAL_MARK);
    1812              : };
    1813              : 
    1814              : struct AddInstrumentChangeTextCommand {
    1815              :     cprop_decl id = Command("command://notation/add-instrument-change");
    1816              :     cprop_decl title = MnemonicString("action", "&Instrument change");
    1817              :     cprop_decl description = TranslatableString("action", "Add text: instrument change");
    1818              :     cprop_decl availabilities = Availability::UI;
    1819              :     cprop_decl redirect = AddTextCommand(TextStyleType::INSTRUMENT_CHANGE);
    1820              : };
    1821              : 
    1822              : struct AddFingeringTextCommand {
    1823              :     cprop_decl id = Command("command://notation/add-fingering");
    1824              :     cprop_decl title = MnemonicString("action", "&Fingering");
    1825              :     cprop_decl description = TranslatableString("action", "Add text: fingering");
    1826              :     cprop_decl availabilities = Availability::UI;
    1827              :     cprop_decl redirect = AddTextCommand(TextStyleType::FINGERING);
    1828              : };
    1829              : 
    1830              : struct AddStickingTextCommand {
    1831              :     cprop_decl id = Command("command://notation/add-sticking");
    1832              :     cprop_decl title = MnemonicString("action", "Stic&king");
    1833              :     cprop_decl description = TranslatableString("action", "Add text: sticking");
    1834              :     cprop_decl availabilities = Availability::UI;
    1835              :     cprop_decl redirect = AddTextCommand(TextStyleType::STICKING);
    1836              : };
    1837              : 
    1838              : struct AddChordTextCommand {
    1839              :     cprop_decl id = Command("command://notation/add-chord-symbol");
    1840              :     cprop_decl title = MnemonicString("action", "C&hord symbol");
    1841              :     cprop_decl description = TranslatableString("action", "Add text: chord symbol");
    1842              :     cprop_decl availabilities = Availability::UI;
    1843              :     cprop_decl redirect = AddTextCommand(TextStyleType::HARMONY_A);
    1844              : };
    1845              : 
    1846              : struct AddRomanNumeralTextCommand {
    1847              :     cprop_decl id = Command("command://notation/add-text/roman-numeral");
    1848              :     cprop_decl title = MnemonicString("action", "R&oman numeral analysis");
    1849              :     cprop_decl description = TranslatableString("action", "Add text: Roman numeral analysis");
    1850              :     cprop_decl availabilities = Availability::UI;
    1851              :     cprop_decl redirect = AddTextCommand(TextStyleType::HARMONY_ROMAN);
    1852              : };
    1853              : 
    1854              : struct AddNashvilleNumberTextCommand {
    1855              :     cprop_decl id = Command("command://notation/add-text/nashville-number");
    1856              :     cprop_decl title = MnemonicString("action", "&Nashville number");
    1857              :     cprop_decl description = TranslatableString("action", "Add text: Nashville number");
    1858              :     cprop_decl availabilities = Availability::UI;
    1859              :     cprop_decl redirect = AddTextCommand(TextStyleType::HARMONY_NASHVILLE);
    1860              : };
    1861              : 
    1862              : struct AddLyricsCommand {
    1863              :     cprop_decl id = Command("command://notation/add-lyrics");
    1864              :     cprop_decl title = MnemonicString("action", "L&yrics");
    1865              :     cprop_decl description = TranslatableString("action", "Add text: lyrics");
    1866              :     cprop_decl availabilities = Availability::UI;
    1867              :     cprop_decl redirect = AddTextCommand(TextStyleType::LYRICS_ODD);
    1868              : };
    1869              : 
    1870              : struct AddTempoCommand {
    1871              :     cprop_decl id = Command("command://notation/add-tempo");
    1872              :     cprop_decl title = MnemonicString("action", "Tempo &marking");
    1873              :     cprop_decl description = TranslatableString("action", "Add text: tempo marking");
    1874              :     cprop_decl availabilities = Availability::UI;
    1875              :     cprop_decl redirect = AddTextCommand(TextStyleType::TEMPO);
    1876              : };
    1877              : 
    1878              : struct AddBeamCommand {
    1879              :     cprop_decl id = Command("command://notation/add-beam");
    1880              :     cprop_decl title = MnemonicString("action", "Add beam");
    1881              :     cprop_decl description = TranslatableString("action", "Add beam");
    1882              :     cprop_decl availabilities = Availability::API;
    1883              : 
    1884              :     BeamMode mode = BeamMode::AUTO;
    1885              : 
    1886              :     cprop_decl input = FieldsScheme {
    1887              :         Field{ "mode", &AddBeamCommand::mode, "Beam mode" },
    1888              :     };
    1889              : };
    1890              : 
    1891              : // aliases for add beam command
    1892              : 
    1893              : struct AddBeamAutoCommand {
    1894              :     cprop_decl id = Command("command://notation/add-beam/auto");
    1895              :     cprop_decl title = MnemonicString("action", "Auto beam");
    1896              :     cprop_decl description = TranslatableString("action", "Add beam: auto");
    1897              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::AUTO_TEXT);
    1898              :     cprop_decl availabilities = Availability::UI;
    1899              :     cprop_decl redirect = AddBeamCommand(BeamMode::AUTO);
    1900              : };
    1901              : 
    1902              : struct AddBeamNoneCommand {
    1903              :     cprop_decl id = Command("command://notation/add-beam/none");
    1904              :     cprop_decl title = MnemonicString("action", "No beam");
    1905              :     cprop_decl description = TranslatableString("action", "Add beam: none");
    1906              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::BEAM_NONE);
    1907              :     cprop_decl availabilities = Availability::UI;
    1908              :     cprop_decl redirect = AddBeamCommand(BeamMode::NONE);
    1909              : };
    1910              : 
    1911              : struct AddBeamBeginCommand {
    1912              :     cprop_decl id = Command("command://notation/add-beam/begin");
    1913              :     cprop_decl title = MnemonicString("action", "Break beam left");
    1914              :     cprop_decl description = TranslatableString("action", "Break beam left");
    1915              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::BEAM_BREAK_LEFT);
    1916              :     cprop_decl availabilities = Availability::UI;
    1917              :     cprop_decl redirect = AddBeamCommand(BeamMode::BEGIN);
    1918              : };
    1919              : 
    1920              : struct AddBeamBegin16Command {
    1921              :     cprop_decl id = Command("command://notation/add-beam/begin16");
    1922              :     cprop_decl title = MnemonicString("action", "Break inner beams (8th)");
    1923              :     cprop_decl description = TranslatableString("action", "Break inner beams (eighth)");
    1924              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::BEAM_BREAK_INNER_8TH);
    1925              :     cprop_decl availabilities = Availability::UI;
    1926              :     cprop_decl redirect = AddBeamCommand(BeamMode::BEGIN16);
    1927              : };
    1928              : 
    1929              : struct AddBeamBegin32Command {
    1930              :     cprop_decl id = Command("command://notation/add-beam/begin32");
    1931              :     cprop_decl title = MnemonicString("action", "Break inner beams (16th)");
    1932              :     cprop_decl description = TranslatableString("action", "Break inner beams (16th)");
    1933              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::BEAM_BREAK_INNER_16TH);
    1934              :     cprop_decl availabilities = Availability::UI;
    1935              :     cprop_decl redirect = AddBeamCommand(BeamMode::BEGIN32);
    1936              : };
    1937              : 
    1938              : struct AddBeamMidCommand {
    1939              :     cprop_decl id = Command("command://notation/add-beam/mid");
    1940              :     cprop_decl title = MnemonicString("action", "Join beams");
    1941              :     cprop_decl description = TranslatableString("action", "Join beams");
    1942              :     cprop_decl decoration = Decoration(muse::ui::IconCode::Code::BEAM_JOIN);
    1943              :     cprop_decl availabilities = Availability::UI;
    1944              :     cprop_decl redirect = AddBeamCommand(BeamMode::MID);
    1945              : };
    1946              : 
    1947              : struct AddOrnamentCommand {
    1948              :     cprop_decl id = Command("command://notation/add-ornament");
    1949              :     cprop_decl title = MnemonicString("action", "Add ornament");
    1950              :     cprop_decl description = TranslatableString("action", "Add ornament");
    1951              :     cprop_decl availabilities = Availability::API;
    1952              : 
    1953              :     OrnamentType type = OrnamentType::UNDEFINED;
    1954              : 
    1955              :     cprop_decl input = FieldsScheme {
    1956              :         Field{ "type", &AddOrnamentCommand::type, "Ornament type" },
    1957              :     };
    1958              : };
    1959              : 
    1960              : // add ornament commands
    1961              : 
    1962              : struct AddOrnamentTurnCommand {
    1963              :     cprop_decl id = Command("command://notation/add-ornament/turn");
    1964              :     cprop_decl title = MnemonicString("action", "Toggle turn");
    1965              :     cprop_decl description = TranslatableString("action", "Add ornament: turn");
    1966              :     cprop_decl availabilities = Availability::UI;
    1967              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TURN);
    1968              : };
    1969              : 
    1970              : struct AddOrnamentTurnInvertedCommand {
    1971              :     cprop_decl id = Command("command://notation/add-ornament/turn-inverted");
    1972              :     cprop_decl title = MnemonicString("action", "Toggle inverted turn");
    1973              :     cprop_decl description = TranslatableString("action", "Add ornament: inverted turn");
    1974              :     cprop_decl availabilities = Availability::UI;
    1975              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TURN_INVERTED);
    1976              : };
    1977              : 
    1978              : struct AddOrnamentTurnSlashCommand {
    1979              :     cprop_decl id = Command("command://notation/add-ornament/turn-slash");
    1980              :     cprop_decl title = MnemonicString("action", "Toggle turn with slash");
    1981              :     cprop_decl description = TranslatableString("action", "Add ornament: turn with slash");
    1982              :     cprop_decl availabilities = Availability::UI;
    1983              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TURN_SLASH);
    1984              : };
    1985              : 
    1986              : struct AddOrnamentTurnUpCommand {
    1987              :     cprop_decl id = Command("command://notation/add-ornament/turn-up");
    1988              :     cprop_decl title = MnemonicString("action", "Toggle turn up");
    1989              :     cprop_decl description = TranslatableString("action", "Add ornament: turn up");
    1990              :     cprop_decl availabilities = Availability::UI;
    1991              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TURN_UP);
    1992              : };
    1993              : 
    1994              : struct AddOrnamentTurnInvertedUpCommand {
    1995              :     cprop_decl id = Command("command://notation/add-ornament/turn-inverted-up");
    1996              :     cprop_decl title = MnemonicString("action", "Toggle vertical inverted turn");
    1997              :     cprop_decl description = TranslatableString("action", "Add ornament: vertical inverted turn");
    1998              :     cprop_decl availabilities = Availability::UI;
    1999              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TURN_INVERTED_UP);
    2000              : };
    2001              : 
    2002              : struct AddOrnamentTrillCommand {
    2003              :     cprop_decl id = Command("command://notation/add-ornament/trill");
    2004              :     cprop_decl title = MnemonicString("action", "Toggle trill");
    2005              :     cprop_decl description = TranslatableString("action", "Add ornament: trill");
    2006              :     cprop_decl availabilities = Availability::UI;
    2007              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TRILL);
    2008              : };
    2009              : 
    2010              : struct AddOrnamentShortTrillCommand {
    2011              :     cprop_decl id = Command("command://notation/add-ornament/short-trill");
    2012              :     cprop_decl title = MnemonicString("action", "Toggle short trill");
    2013              :     cprop_decl description = TranslatableString("action", "Add ornament: short trill");
    2014              :     cprop_decl availabilities = Availability::UI;
    2015              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::SHORT_TRILL);
    2016              : };
    2017              : 
    2018              : struct AddOrnamentMordentCommand {
    2019              :     cprop_decl id = Command("command://notation/add-ornament/mordent");
    2020              :     cprop_decl title = MnemonicString("action", "Toggle mordent");
    2021              :     cprop_decl description = TranslatableString("action", "Add ornament: mordent");
    2022              :     cprop_decl availabilities = Availability::UI;
    2023              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::MORDENT);
    2024              : };
    2025              : 
    2026              : struct AddOrnamentHaydnCommand {
    2027              :     cprop_decl id = Command("command://notation/add-ornament/haydn");
    2028              :     cprop_decl title = MnemonicString("action", "Toggle Haydn ornament");
    2029              :     cprop_decl description = TranslatableString("action", "Add ornament: Haydn ornament");
    2030              :     cprop_decl availabilities = Availability::UI;
    2031              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::HAYDN);
    2032              : };
    2033              : 
    2034              : struct AddOrnamentTremblementCommand {
    2035              :     cprop_decl id = Command("command://notation/add-ornament/tremblement");
    2036              :     cprop_decl title = MnemonicString("action", "Toggle tremblement");
    2037              :     cprop_decl description = TranslatableString("action", "Add ornament: tremblement");
    2038              :     cprop_decl availabilities = Availability::UI;
    2039              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TREMBLEMENT);
    2040              : };
    2041              : 
    2042              : struct AddOrnamentPrallMordentCommand {
    2043              :     cprop_decl id = Command("command://notation/add-ornament/prall-mordent");
    2044              :     cprop_decl title = MnemonicString("action", "Toggle prall mordent");
    2045              :     cprop_decl description = TranslatableString("action", "Add ornament: prall mordent");
    2046              :     cprop_decl availabilities = Availability::UI;
    2047              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::PRALL_MORDENT);
    2048              : };
    2049              : 
    2050              : struct AddOrnamentShakeCommand {
    2051              :     cprop_decl id = Command("command://notation/add-ornament/shake");
    2052              :     cprop_decl title = MnemonicString("action", "Toggle shake");
    2053              :     cprop_decl description = TranslatableString("action", "Add ornament: shake");
    2054              :     cprop_decl availabilities = Availability::UI;
    2055              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::SHAKE);
    2056              : };
    2057              : 
    2058              : struct AddOrnamentShakeMuffatCommand {
    2059              :     cprop_decl id = Command("command://notation/add-ornament/shake-muffat");
    2060              :     cprop_decl title = MnemonicString("action", "Toggle shake (Muffat)");
    2061              :     cprop_decl description = TranslatableString("action", "Add ornament: shake (Muffat)");
    2062              :     cprop_decl availabilities = Availability::UI;
    2063              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::SHAKE_MUFFAT);
    2064              : };
    2065              : 
    2066              : struct AddOrnamentTremblementCouperinCommand {
    2067              :     cprop_decl id = Command("command://notation/add-ornament/tremblement-couperin");
    2068              :     cprop_decl title = MnemonicString("action", "Toggle tremblement appuyé (Couperin)");
    2069              :     cprop_decl description = TranslatableString("action", "Add ornament: tremblement appuyé (Couperin)");
    2070              :     cprop_decl availabilities = Availability::UI;
    2071              :     cprop_decl redirect = AddOrnamentCommand(OrnamentType::TREMBLEMENT_COUPERIN);
    2072              : };
    2073              : 
    2074              : struct FlipCommand {
    2075              :     cprop_decl id = Command("command://notation/flip");
    2076              :     cprop_decl title = MnemonicString("action", "Flip direction");
    2077              :     cprop_decl description = TranslatableString("action", "Flip direction");
    2078              :     cprop_decl decoration = muse::rcommand::Decoration(muse::ui::IconCode::Code::NOTE_FLIP);
    2079              : };
    2080              : 
    2081              : struct AddFretCommand {
    2082              :     cprop_decl id = Command("command://notation/add-fret");
    2083              :     cprop_decl title = MnemonicString("action", "Add fret");
    2084              :     cprop_decl description = TranslatableString("action", "Add fret");
    2085              :     cprop_decl availabilities = Availability::API;
    2086              : 
    2087              :     int num = 0;
    2088              : 
    2089              :     cprop_decl input = FieldsScheme {
    2090              :         Field{ "num", &AddFretCommand::num, "Number", 0, 14 },
    2091              :     };
    2092              : };
    2093              : 
    2094              : // aliases for add fret command
    2095              : 
    2096              : struct AddFret0Command {
    2097              :     cprop_decl id = Command("command://notation/add-fret/0");
    2098              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(0));
    2099              :     cprop_decl description = prv::enter_TAB_fret_X().arg(0);
    2100              :     cprop_decl availabilities = Availability::UI;
    2101              :     cprop_decl redirect = AddFretCommand(0);
    2102              : };
    2103              : 
    2104              : struct AddFret1Command {
    2105              :     cprop_decl id = Command("command://notation/add-fret/1");
    2106              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(1));
    2107              :     cprop_decl description = prv::enter_TAB_fret_X().arg(1);
    2108              :     cprop_decl availabilities = Availability::UI;
    2109              :     cprop_decl redirect = AddFretCommand(1);
    2110              : };
    2111              : 
    2112              : struct AddFret2Command {
    2113              :     cprop_decl id = Command("command://notation/add-fret/2");
    2114              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(2));
    2115              :     cprop_decl description = prv::enter_TAB_fret_X().arg(2);
    2116              :     cprop_decl availabilities = Availability::UI;
    2117              :     cprop_decl redirect = AddFretCommand(2);
    2118              : };
    2119              : 
    2120              : struct AddFret3Command {
    2121              :     cprop_decl id = Command("command://notation/add-fret/3");
    2122              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(3));
    2123              :     cprop_decl description = prv::enter_TAB_fret_X().arg(3);
    2124              :     cprop_decl availabilities = Availability::UI;
    2125              :     cprop_decl redirect = AddFretCommand(3);
    2126              : };
    2127              : 
    2128              : struct AddFret4Command {
    2129              :     cprop_decl id = Command("command://notation/add-fret/4");
    2130              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(4));
    2131              :     cprop_decl description = prv::enter_TAB_fret_X().arg(4);
    2132              :     cprop_decl availabilities = Availability::UI;
    2133              :     cprop_decl redirect = AddFretCommand(4);
    2134              : };
    2135              : 
    2136              : struct AddFret5Command {
    2137              :     cprop_decl id = Command("command://notation/add-fret/5");
    2138              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(5));
    2139              :     cprop_decl description = prv::enter_TAB_fret_X().arg(5);
    2140              :     cprop_decl availabilities = Availability::UI;
    2141              :     cprop_decl redirect = AddFretCommand(5);
    2142              : };
    2143              : 
    2144              : struct AddFret6Command {
    2145              :     cprop_decl id = Command("command://notation/add-fret/6");
    2146              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(6));
    2147              :     cprop_decl description = prv::enter_TAB_fret_X().arg(6);
    2148              :     cprop_decl availabilities = Availability::UI;
    2149              :     cprop_decl redirect = AddFretCommand(6);
    2150              : };
    2151              : 
    2152              : struct AddFret7Command {
    2153              :     cprop_decl id = Command("command://notation/add-fret/7");
    2154              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(7));
    2155              :     cprop_decl description = prv::enter_TAB_fret_X().arg(7);
    2156              :     cprop_decl availabilities = Availability::UI;
    2157              :     cprop_decl redirect = AddFretCommand(7);
    2158              : };
    2159              : 
    2160              : struct AddFret8Command {
    2161              :     cprop_decl id = Command("command://notation/add-fret/8");
    2162              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(8));
    2163              :     cprop_decl description = prv::enter_TAB_fret_X().arg(8);
    2164              :     cprop_decl availabilities = Availability::UI;
    2165              :     cprop_decl redirect = AddFretCommand(8);
    2166              : };
    2167              : 
    2168              : struct AddFret9Command {
    2169              :     cprop_decl id = Command("command://notation/add-fret/9");
    2170              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(9));
    2171              :     cprop_decl description = prv::enter_TAB_fret_X().arg(9);
    2172              :     cprop_decl availabilities = Availability::UI;
    2173              :     cprop_decl redirect = AddFretCommand(9);
    2174              : };
    2175              : 
    2176              : struct AddFret10Command {
    2177              :     cprop_decl id = Command("command://notation/add-fret/10");
    2178              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(10));
    2179              :     cprop_decl description = prv::enter_TAB_fret_X().arg(10);
    2180              :     cprop_decl availabilities = Availability::UI;
    2181              :     cprop_decl redirect = AddFretCommand(10);
    2182              : };
    2183              : 
    2184              : struct AddFret11Command {
    2185              :     cprop_decl id = Command("command://notation/add-fret/11");
    2186              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(11));
    2187              :     cprop_decl description = prv::enter_TAB_fret_X().arg(11);
    2188              :     cprop_decl availabilities = Availability::UI;
    2189              :     cprop_decl redirect = AddFretCommand(11);
    2190              : };
    2191              : 
    2192              : struct AddFret12Command {
    2193              :     cprop_decl id = Command("command://notation/add-fret/12");
    2194              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(12));
    2195              :     cprop_decl description = prv::enter_TAB_fret_X().arg(12);
    2196              :     cprop_decl availabilities = Availability::UI;
    2197              :     cprop_decl redirect = AddFretCommand(12);
    2198              : };
    2199              : 
    2200              : struct AddFret13Command {
    2201              :     cprop_decl id = Command("command://notation/add-fret/13");
    2202              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(13));
    2203              :     cprop_decl description = prv::enter_TAB_fret_X().arg(13);
    2204              :     cprop_decl availabilities = Availability::UI;
    2205              :     cprop_decl redirect = AddFretCommand(13);
    2206              : };
    2207              : 
    2208              : struct AddFret14Command {
    2209              :     cprop_decl id = Command("command://notation/add-fret/14");
    2210              :     cprop_decl title = MnemonicString(prv::fret_X_TAB().arg(14));
    2211              :     cprop_decl description = prv::enter_TAB_fret_X().arg(14);
    2212              :     cprop_decl availabilities = Availability::UI;
    2213              :     cprop_decl redirect = AddFretCommand(14);
    2214              : };
    2215              : 
    2216              : // text navigation commands
    2217              : 
    2218              : struct EditTextAdvanceCommand {
    2219              :     cprop_decl id = Command("command://notation/edittext-advance");
    2220              :     cprop_decl title = MnemonicString("action", "Advance cursor");
    2221              :     cprop_decl description = TranslatableString("action", "Advance cursor in chord symbols / figured bass");
    2222              :     cprop_decl availabilities = Availability::API;
    2223              : 
    2224              :     DurationType duration = DurationType::V_QUARTER;
    2225              : 
    2226              :     cprop_decl input = FieldsScheme {
    2227              :         Field{ "duration", &EditTextAdvanceCommand::duration, "Duration to advance by" },
    2228              :     };
    2229              : };
    2230              : 
    2231              : // aliases for edittext advance command
    2232              : 
    2233              : struct EditTextAdvanceLongaCommand {
    2234              :     cprop_decl id = Command("command://notation/edittext-advance/longa");
    2235              :     cprop_decl title = MnemonicString("action", "Advance cursor: longa (chord symbols/figured bass)");
    2236              :     cprop_decl description = TranslatableString("action", "Advance cursor: longa (chord symbols/figured bass)");
    2237              :     cprop_decl availabilities = Availability::UI;
    2238              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_LONG);
    2239              : };
    2240              : 
    2241              : struct EditTextAdvanceBreveCommand {
    2242              :     cprop_decl id = Command("command://notation/edittext-advance/breve");
    2243              :     cprop_decl title = MnemonicString("action", "Advance cursor: breve (chord symbols/figured bass)");
    2244              :     cprop_decl description = TranslatableString("action", "Advance cursor: breve (chord symbols/figured bass)");
    2245              :     cprop_decl availabilities = Availability::UI;
    2246              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_BREVE);
    2247              : };
    2248              : 
    2249              : struct EditTextAdvance1Command {
    2250              :     cprop_decl id = Command("command://notation/edittext-advance/1");
    2251              :     cprop_decl title = MnemonicString("action", "Advance cursor: whole note (chord symbols/figured bass)");
    2252              :     cprop_decl description = TranslatableString("action", "Advance cursor: whole note (chord symbols/figured bass)");
    2253              :     cprop_decl availabilities = Availability::UI;
    2254              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_WHOLE);
    2255              : };
    2256              : 
    2257              : struct EditTextAdvance2Command {
    2258              :     cprop_decl id = Command("command://notation/edittext-advance/2");
    2259              :     cprop_decl title = MnemonicString("action", "Advance cursor: half note (chord symbols/figured bass)");
    2260              :     cprop_decl description = TranslatableString("action", "Advance cursor: half note (chord symbols/figured bass)");
    2261              :     cprop_decl availabilities = Availability::UI;
    2262              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_HALF);
    2263              : };
    2264              : 
    2265              : struct EditTextAdvance4Command {
    2266              :     cprop_decl id = Command("command://notation/edittext-advance/4");
    2267              :     cprop_decl title = MnemonicString("action", "Advance cursor: quarter note (chord symbols/figured bass)");
    2268              :     cprop_decl description = TranslatableString("action", "Advance cursor: quarter note (chord symbols/figured bass)");
    2269              :     cprop_decl availabilities = Availability::UI;
    2270              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_QUARTER);
    2271              : };
    2272              : 
    2273              : struct EditTextAdvance8Command {
    2274              :     cprop_decl id = Command("command://notation/edittext-advance/8");
    2275              :     cprop_decl title = MnemonicString("action", "Advance cursor: eighth note (chord symbols/figured bass)");
    2276              :     cprop_decl description = TranslatableString("action", "Advance cursor: eighth note (chord symbols/figured bass)");
    2277              :     cprop_decl availabilities = Availability::UI;
    2278              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_EIGHTH);
    2279              : };
    2280              : 
    2281              : struct EditTextAdvance16Command {
    2282              :     cprop_decl id = Command("command://notation/edittext-advance/16");
    2283              :     cprop_decl title = MnemonicString("action", "Advance cursor: 16th note (chord symbols/figured bass)");
    2284              :     cprop_decl description = TranslatableString("action", "Advance cursor: 16th note (chord symbols/figured bass)");
    2285              :     cprop_decl availabilities = Availability::UI;
    2286              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_16TH);
    2287              : };
    2288              : 
    2289              : struct EditTextAdvance32Command {
    2290              :     cprop_decl id = Command("command://notation/edittext-advance/32");
    2291              :     cprop_decl title = MnemonicString("action", "Advance cursor: 32nd note (chord symbols/figured bass)");
    2292              :     cprop_decl description = TranslatableString("action", "Advance cursor: 32nd note (chord symbols/figured bass)");
    2293              :     cprop_decl availabilities = Availability::UI;
    2294              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_32ND);
    2295              : };
    2296              : 
    2297              : struct EditTextAdvance64Command {
    2298              :     cprop_decl id = Command("command://notation/edittext-advance/64");
    2299              :     cprop_decl title = MnemonicString("action", "Advance cursor: 64th note (chord symbols/figured bass)");
    2300              :     cprop_decl description = TranslatableString("action", "Advance cursor: 64th note (chord symbols/figured bass)");
    2301              :     cprop_decl availabilities = Availability::UI;
    2302              :     cprop_decl redirect = EditTextAdvanceCommand(DurationType::V_64TH);
    2303              : };
    2304              : }
    2305              : 
    2306              : namespace mu::notation {
    2307              : // text navigation commands
    2308              : inline static const muse::rcommand::Command EDITTEXT_NEXT_WORD_COMMAND("command://notation/edittext-next-word");
    2309              : inline static const muse::rcommand::Command EDITTEXT_NEXT_ELEMENT_COMMAND("command://notation/edittext-next-element");
    2310              : inline static const muse::rcommand::Command EDITTEXT_PREV_ELEMENT_COMMAND("command://notation/edittext-prev-element");
    2311              : inline static const muse::rcommand::Command EDITTEXT_NEXT_BEAT_COMMAND("command://notation/edittext-next-beat");
    2312              : inline static const muse::rcommand::Command EDITTEXT_PREV_BEAT_COMMAND("command://notation/edittext-prev-beat");
    2313              : 
    2314              : // lyrics editing commands
    2315              : inline static const muse::rcommand::Command EDITLYRIC_NEXT_VERSE_COMMAND("command://notation/editlyrics-next-verse");
    2316              : inline static const muse::rcommand::Command EDITLYRIC_PREV_VERSE_COMMAND("command://notation/editlyrics-prev-verse");
    2317              : inline static const muse::rcommand::Command EDITLYRIC_NEXT_SYLLABLE_COMMAND("command://notation/editlyrics-next-syllable");
    2318              : inline static const muse::rcommand::Command EDITLYRIC_ADD_MELISMA_COMMAND("command://notation/editlyrics-add-melisma");
    2319              : inline static const muse::rcommand::Command EDITLYRIC_ADD_VERSE_COMMAND("command://notation/editlyrics-add-verse");
    2320              : 
    2321              : // text editing commands
    2322              : inline static const muse::rcommand::Command EDITTEXT_TOGGLE_BOLD_COMMAND("command://notation/edittext-toggle-bold");
    2323              : inline static const muse::rcommand::Command EDITTEXT_TOGGLE_ITALIC_COMMAND("command://notation/edittext-toggle-italic");
    2324              : inline static const muse::rcommand::Command EDITTEXT_TOGGLE_UNDERLINE_COMMAND("command://notation/edittext-toggle-underline");
    2325              : inline static const muse::rcommand::Command EDITTEXT_TOGGLE_STRIKE_COMMAND("command://notation/edittext-toggle-strike");
    2326              : inline static const muse::rcommand::Command EDITTEXT_TOGGLE_SUBSCRIPT_COMMAND("command://notation/edittext-toggle-subscript");
    2327              : inline static const muse::rcommand::Command EDITTEXT_TOGGLE_SUPERSCRIPT_COMMAND("command://notation/edittext-toggle-superscript");
    2328              : 
    2329              : // note input commands
    2330              : 
    2331              : inline static const muse::rcommand::Command REALTIME_ADVANCE_COMMAND("command://notation/realtime-advance");
    2332              : 
    2333              : inline static const muse::rcommand::Command EXTEND_TO_NEXT_NOTE_COMMAND("command://notation/extend-to-next-note");
    2334              : 
    2335              : inline static const muse::rcommand::Command TOGGLE_TIE_COMMAND("command://notation/toggle-tie");
    2336              : inline static const muse::rcommand::Command ADD_SLUR_COMMAND("command://notation/add-slur");
    2337              : inline static const muse::rcommand::Command TOGGLE_LV_COMMAND("command://notation/toggle-laissez-vibrer");
    2338              : inline static const muse::rcommand::Command TOGGLE_MARCATO_COMMAND("command://notation/toggle-marcato");
    2339              : inline static const muse::rcommand::Command TOGGLE_SFORZATO_COMMAND("command://notation/toggle-sforzato");
    2340              : inline static const muse::rcommand::Command TOGGLE_TENUTO_COMMAND("command://notation/toggle-tenuto");
    2341              : inline static const muse::rcommand::Command TOGGLE_STACCATO_COMMAND("command://notation/toggle-staccato");
    2342              : 
    2343              : // voice commands
    2344              : 
    2345              : inline static const muse::rcommand::Command VOICE_ASSIGNMENT_ALL_IN_INSTR_COMMAND("command://notation/voice-assignment-all-in-instrument");
    2346              : inline static const muse::rcommand::Command VOICE_ASSIGNMENT_ALL_IN_STAFF_COMMAND("command://notation/voice-assignment-all-in-staff");
    2347              : 
    2348              : //inline static const muse::rcommand::Command FLIP_COMMAND("command://notation/flip");
    2349              : inline static const muse::rcommand::Command FLIP_HORIZONTALLY_COMMAND("command://notation/flip-horizontally");
    2350              : 
    2351              : //inline static const muse::rcommand::Command ADD_NOTE_COMMAND("command://notation/add-note"); // with params
    2352              : inline static const muse::rcommand::Command ADD_DRUM_NOTE_COMMAND("command://notation/add-drum-note"); // with params
    2353              : 
    2354              : inline static const muse::rcommand::Command ENTER_REST_COMMAND("command://notation/enter-rest");
    2355              : 
    2356              : // add commands
    2357              : 
    2358              : inline static const muse::rcommand::Command ADD_FRETBOARD_DIAGRAM_COMMAND("command://notation/add-fretboard-diagram");
    2359              : 
    2360              : inline static const muse::rcommand::Command ADD_OTTAVA_8VA_COMMAND("command://notation/add-ottava-8va");
    2361              : inline static const muse::rcommand::Command ADD_OTTAVA_8VB_COMMAND("command://notation/add-ottava-8vb");
    2362              : 
    2363              : inline static const muse::rcommand::Command ADD_DYNAMIC_COMMAND("command://notation/add-dynamic");
    2364              : inline static const muse::rcommand::Command ADD_HAIRPIN_COMMAND("command://notation/add-hairpin");
    2365              : inline static const muse::rcommand::Command ADD_HAIRPIN_REVERSE_COMMAND("command://notation/add-hairpin-reverse");
    2366              : inline static const muse::rcommand::Command INCREASE_DYNAMIC_COMMAND("command://notation/increase-dynamic");
    2367              : inline static const muse::rcommand::Command DECREASE_DYNAMIC_COMMAND("command://notation/decrease-dynamic");
    2368              : inline static const muse::rcommand::Command ADD_NOTELINE_COMMAND("command://notation/add-noteline");
    2369              : 
    2370              : inline static const muse::rcommand::Command ADD_IMAGE_COMMAND("command://notation/add-image");
    2371              : 
    2372              : inline static const muse::rcommand::Command ADD_UP_BOW_COMMAND("command://notation/add-up-bow");
    2373              : inline static const muse::rcommand::Command ADD_DOWN_BOW_COMMAND("command://notation/add-down-bow");
    2374              : 
    2375              : // add text commands
    2376              : 
    2377              : inline static const muse::rcommand::Command ADD_FIGURED_BASS_COMMAND("command://notation/add-figured-bass");
    2378              : 
    2379              : // add beam commands
    2380              : 
    2381              : inline static const muse::rcommand::Command ADD_BEAM_SELECTED_RANGE_COMMAND("command://notation/add-beam-selected-range");
    2382              : 
    2383              : // add brackets commands
    2384              : inline static const muse::rcommand::Command ADD_BRACKETS_COMMAND("command://notation/add-brackets");
    2385              : inline static const muse::rcommand::Command ADD_PARENTHESES_COMMAND("command://notation/add-parentheses");
    2386              : inline static const muse::rcommand::Command ADD_BRACES_COMMAND("command://notation/add-braces");
    2387              : 
    2388              : // clef commands
    2389              : inline static const muse::rcommand::Command ADD_CLEF_VIOLIN_COMMAND("command://notation/add-clef-violin");
    2390              : inline static const muse::rcommand::Command ADD_CLEF_BASS_COMMAND("command://notation/add-clef-bass");
    2391              : 
    2392              : inline static const muse::rcommand::Command ADD_FULL_MEASURE_REST_COMMAND("command://notation/add-full-measure-rest");
    2393              : 
    2394              : inline static const muse::rcommand::Command EDIT_ELEMENT_COMMAND("command://notation/edit-element");
    2395              : 
    2396              : // move commands
    2397              : inline static const muse::rcommand::Command MOVE_RIGHT_COMMAND("command://notation/move-right");
    2398              : inline static const muse::rcommand::Command MOVE_LEFT_COMMAND("command://notation/move-left");
    2399              : inline static const muse::rcommand::Command MOVE_RIGHT_QUICKLY_COMMAND("command://notation/move-right-quickly");
    2400              : inline static const muse::rcommand::Command MOVE_LEFT_QUICKLY_COMMAND("command://notation/move-left-quickly");
    2401              : inline static const muse::rcommand::Command MOVE_UP_COMMAND("command://notation/move-up");
    2402              : inline static const muse::rcommand::Command MOVE_DOWN_COMMAND("command://notation/move-down");
    2403              : inline static const muse::rcommand::Command SWAP_LEFT_COMMAND("command://notation/swap-left");
    2404              : inline static const muse::rcommand::Command SWAP_RIGHT_COMMAND("command://notation/swap-right");
    2405              : 
    2406              : inline static const muse::rcommand::Command PITCH_UP_COMMAND("command://notation/pitch-up");
    2407              : inline static const muse::rcommand::Command PITCH_DOWN_COMMAND("command://notation/pitch-down");
    2408              : inline static const muse::rcommand::Command PITCH_UP_OCTAVE_COMMAND("command://notation/pitch-up-octave");
    2409              : inline static const muse::rcommand::Command PITCH_DOWN_OCTAVE_COMMAND("command://notation/pitch-down-octave");
    2410              : inline static const muse::rcommand::Command PITCH_UP_DIATONIC_COMMAND("command://notation/pitch-up-diatonic");
    2411              : inline static const muse::rcommand::Command PITCH_DOWN_DIATONIC_COMMAND("command://notation/pitch-down-diatonic");
    2412              : inline static const muse::rcommand::Command PITCH_UP_DIATONIC_ALTERATIONS_COMMAND("command://notation/pitch-up-diatonic-alterations");
    2413              : inline static const muse::rcommand::Command PITCH_DOWN_DIATONIC_ALTERATIONS_COMMAND("command://notation/pitch-down-diatonic-alterations");
    2414              : 
    2415              : // properties commands
    2416              : inline static const muse::rcommand::Command TOGGLE_VISIBLE_COMMAND("command://notation/toggle-visible");
    2417              : 
    2418              : // snap commands
    2419              : inline static const muse::rcommand::Command TOGGLE_SNAP_TO_PREV_COMMAND("command://notation/toggle-snap-to-prev");
    2420              : inline static const muse::rcommand::Command TOGGLE_SNAP_TO_NEXT_COMMAND("command://notation/toggle-snap-to-next");
    2421              : 
    2422              : // layout commands
    2423              : 
    2424              : // layout commands: measure
    2425              : inline static const muse::rcommand::Command MOVE_MEASURE_TO_PREV_SYSTEM_COMMAND("command://notation/move-measure-to-prev-system");
    2426              : inline static const muse::rcommand::Command MOVE_MEASURE_TO_NEXT_SYSTEM_COMMAND("command://notation/move-measure-to-next-system");
    2427              : inline static const muse::rcommand::Command SPLIT_MEASURE_COMMAND("command://notation/split-measure");
    2428              : inline static const muse::rcommand::Command JOIN_MEASURES_COMMAND("command://notation/join-measures");
    2429              : 
    2430              : // layout commands: section
    2431              : inline static const muse::rcommand::Command TOGGLE_SECTION_BREAK_COMMAND("command://notation/toggle-section-break");
    2432              : 
    2433              : // layout commands: system
    2434              : inline static const muse::rcommand::Command TOGGLE_SYSTEM_BREAK_COMMAND("command://notation/toggle-system-break");
    2435              : inline static const muse::rcommand::Command APPLY_SYSTEM_LOCK_COMMAND("command://notation/apply-system-lock");
    2436              : inline static const muse::rcommand::Command TOGGLE_SYSTEM_LOCK_COMMAND("command://notation/toggle-system-lock");
    2437              : inline static const muse::rcommand::Command MAKE_INTO_SYSTEM_COMMAND("command://notation/make-into-system");
    2438              : inline static const muse::rcommand::Command MOVE_SYSTEM_TO_PREV_PAGE_COMMAND("command://notation/move-system-to-prev-page");
    2439              : inline static const muse::rcommand::Command MOVE_SYSTEM_TO_NEXT_PAGE_COMMAND("command://notation/move-system-to-next-page");
    2440              : 
    2441              : // layout commands: page
    2442              : inline static const muse::rcommand::Command TOGGLE_PAGE_BREAK_COMMAND("command://notation/toggle-page-break");
    2443              : inline static const muse::rcommand::Command APPLY_PAGE_LOCK_COMMAND("command://notation/apply-page-lock");
    2444              : inline static const muse::rcommand::Command TOGGLE_PAGE_LOCK_COMMAND("command://notation/toggle-page-lock");
    2445              : inline static const muse::rcommand::Command MAKE_INTO_PAGE_COMMAND("command://notation/make-into-page");
    2446              : 
    2447              : // layout commands: score
    2448              : inline static const muse::rcommand::Command TOGGLE_SCORE_LOCK_COMMAND("command://notation/toggle-score-lock");
    2449              : 
    2450              : // layout commands: stretch
    2451              : inline static const muse::rcommand::Command STRETCH_DECREASE_COMMAND("command://notation/stretch-decrease");
    2452              : inline static const muse::rcommand::Command STRETCH_INCREASE_COMMAND("command://notation/stretch-increase");
    2453              : inline static const muse::rcommand::Command STRETCH_RESET_COMMAND("command://notation/stretch-reset");
    2454              : 
    2455              : // open properties
    2456              : inline static const muse::rcommand::Command OPEN_PAGE_SETTINGS_COMMAND("command://notation/open-page-settings");
    2457              : inline static const muse::rcommand::Command OPEN_EDIT_STRINGS_COMMAND("command://notation/open-edit-strings");
    2458              : inline static const muse::rcommand::Command OPEN_BREAKS_COMMAND("command://notation/open-breaks");
    2459              : inline static const muse::rcommand::Command OPEN_STAFF_PROPERTIES_COMMAND("command://notation/open-staff-properties");
    2460              : inline static const muse::rcommand::Command OPEN_STAFF_TEXT_PROPERTIES_COMMAND("command://notation/open-staff-text-properties");
    2461              : inline static const muse::rcommand::Command OPEN_SYSTEM_TEXT_PROPERTIES_COMMAND("command://notation/open-system-text-properties");
    2462              : inline static const muse::rcommand::Command OPEN_MEASURE_PROPERTIES_COMMAND("command://notation/open-measure-properties");
    2463              : inline static const muse::rcommand::Command OPEN_TRANSPOSE_COMMAND("command://notation/open-transpose");
    2464              : inline static const muse::rcommand::Command OPEN_PARTS_COMMAND("command://notation/open-parts");
    2465              : inline static const muse::rcommand::Command OPEN_EDITGRIDSIZE_COMMAND("command://notation/open-editgridsize");
    2466              : inline static const muse::rcommand::Command OPEN_REALIZECHORDSYMBOLS_COMMAND("command://notation/open-realizechordsymbols");
    2467              : 
    2468              : // style commands
    2469              : inline static const muse::rcommand::Command LOAD_STYLE_COMMAND("command://notation/load-style");
    2470              : inline static const muse::rcommand::Command SAVE_STYLE_COMMAND("command://notation/save-style");
    2471              : inline static const muse::rcommand::Command OPEN_EDIT_STYLE_COMMAND("command://notation/open-edit-style");
    2472              : inline static const muse::rcommand::Command TOGGLE_CONCERT_PITCH_COMMAND("command://notation/toggle-concert-pitch");
    2473              : 
    2474              : // reset commands
    2475              : inline static const muse::rcommand::Command RESET_TEXT_STYLE_OVERRIDES_COMMAND("command://notation/reset-text-style-overrides");
    2476              : inline static const muse::rcommand::Command RESET_BEAMS_COMMAND("command://notation/reset-beams");
    2477              : inline static const muse::rcommand::Command RESET_SHAPES_AND_POSITIONS_COMMAND("command://notation/reset-shapes-and-positions");
    2478              : inline static const muse::rcommand::Command RESET_TO_DEFAULT_LAYOUT_COMMAND("command://notation/reset-to-default-layout");
    2479              : 
    2480              : // appearance commands
    2481              : inline static const muse::rcommand::Command FREEZE_CURRENT_PLACEMENT_COMMAND("command://notation/freeze-current-placement");
    2482              : 
    2483              : // show commands
    2484              : inline static const muse::rcommand::Command SHOW_INVISIBLE_COMMAND("command://notation/show-invisible");
    2485              : inline static const muse::rcommand::Command SHOW_UNPRINTABLE_COMMAND("command://notation/show-unprintable");
    2486              : inline static const muse::rcommand::Command SHOW_FRAMES_COMMAND("command://notation/show-frames");
    2487              : inline static const muse::rcommand::Command SHOW_PAGEBORDERS_COMMAND("command://notation/show-pageborders");
    2488              : inline static const muse::rcommand::Command SHOW_SOUNDFLAGS_COMMAND("command://notation/show-soundflags");
    2489              : inline static const muse::rcommand::Command SHOW_IRREGULAR_COMMAND("command://notation/show-irregular");
    2490              : 
    2491              : // staff commands
    2492              : inline static const muse::rcommand::Command STAFF_EXPLODE_COMMAND("command://notation/staff-explode");
    2493              : inline static const muse::rcommand::Command STAFF_IMPLODE_COMMAND("command://notation/staff-implode");
    2494              : 
    2495              : // remove commands
    2496              : inline static const muse::rcommand::Command REMOVE_SELECTED_RANGE_COMMAND("command://notation/remove-selected-range");
    2497              : inline static const muse::rcommand::Command REMOVE_EMPTY_TRAILING_MEASURES_COMMAND("command://notation/remove-empty-trailing-measures");
    2498              : 
    2499              : // slash commands
    2500              : inline static const muse::rcommand::Command SLASH_FILL_COMMAND("command://notation/slash-fill");
    2501              : inline static const muse::rcommand::Command SLASH_RHYTHM_COMMAND("command://notation/slash-rhythm");
    2502              : 
    2503              : // spelling commands
    2504              : inline static const muse::rcommand::Command PITCH_SPELL_COMMAND("command://notation/pitch-spell");
    2505              : inline static const muse::rcommand::Command PITCH_SPELL_SHARPS_COMMAND("command://notation/pitch-spell-sharps");
    2506              : inline static const muse::rcommand::Command PITCH_SPELL_FLATS_COMMAND("command://notation/pitch-spell-flats");
    2507              : inline static const muse::rcommand::Command ENHARMONIC_SPELL_BOTH_COMMAND("command://notation/enharmonic-spell-both");
    2508              : inline static const muse::rcommand::Command ENHARMONIC_SPELL_CURRENT_COMMAND("command://notation/enharmonic-spell-current");
    2509              : 
    2510              : // screen commands
    2511              : inline static const muse::rcommand::Command SCREEN_PUT_NOTE_COMMAND("command://notation/screen-put-note"); // with params
    2512              : inline static const muse::rcommand::Command SCREEN_REMOVE_NOTE_COMMAND("command://notation/screen-remove-note"); // with params
    2513              : inline static const muse::rcommand::Command SCREEN_EDIT_TEXT_COMMAND("command://notation/screen-edit-text"); // with params
    2514              : inline static const muse::rcommand::Command SCREEN_EDIT_ELEMENT_COMMAND("command://notation/screen-edit-element"); // with params
    2515              : 
    2516              : // others commands
    2517              : inline static const muse::rcommand::Command REGROUP_RHYTHMS_COMMAND("command://notation/regroup-rhythms");
    2518              : inline static const muse::rcommand::Command RESEQUENCE_REHEARSAL_MARKS_COMMAND("command://notation/resequence-rehearsal-marks");
    2519              : inline static const muse::rcommand::Command UNROLL_REPEATS_COMMAND("command://notation/unroll-repeats");
    2520              : inline static const muse::rcommand::Command REPEAT_SELECTION_COMMAND("command://notation/repeat-selection");
    2521              : inline static const muse::rcommand::Command TRANSPOSE_UP_COMMAND("command://notation/transpose-up");
    2522              : inline static const muse::rcommand::Command TRANSPOSE_DOWN_COMMAND("command://notation/transpose-down");
    2523              : inline static const muse::rcommand::Command TOGGLE_MMREST_COMMAND("command://notation/toggle-mmrest");
    2524              : inline static const muse::rcommand::Command TOGGLE_HIDE_EMPTY_COMMAND("command://notation/toggle-hide-empty");
    2525              : inline static const muse::rcommand::Command MIRROR_NOTEHEAD_COMMAND("command://notation/mirror-notehead");
    2526              : inline static const muse::rcommand::Command SET_VISIBLE_COMMAND("command://notation/set-visible");
    2527              : inline static const muse::rcommand::Command UNSET_VISIBLE_COMMAND("command://notation/unset-visible");
    2528              : inline static const muse::rcommand::Command TOGGLE_AUTOPLACE_COMMAND("command://notation/toggle-autoplace");
    2529              : inline static const muse::rcommand::Command AUTOPLACE_ENABLED_COMMAND("command://notation/autoplace-enabled");
    2530              : inline static const muse::rcommand::Command TOGGLE_AUTOMATION_COMMAND("command://notation/toggle-automation");
    2531              : inline static const muse::rcommand::Command SELECT_AUTOMATION_TYPE_COMMAND("command://notation/select-automation-type"); // with params
    2532              : 
    2533              : // TAB commands
    2534              : inline static const muse::rcommand::Command SET_DURATION_WHOLE_TAB_COMMAND("command://notation/set-duration-whole-tab");
    2535              : inline static const muse::rcommand::Command SET_DURATION_HALF_TAB_COMMAND("command://notation/set-duration-half-tab");
    2536              : inline static const muse::rcommand::Command SET_DURATION_QUARTER_TAB_COMMAND("command://notation/set-duration-quarter-tab");
    2537              : inline static const muse::rcommand::Command SET_DURATION_EIGHTH_TAB_COMMAND("command://notation/set-duration-eighth-tab");
    2538              : inline static const muse::rcommand::Command SET_DURATION_16TH_TAB_COMMAND("command://notation/set-duration-16th-tab");
    2539              : inline static const muse::rcommand::Command SET_DURATION_32ND_TAB_COMMAND("command://notation/set-duration-32nd-tab");
    2540              : inline static const muse::rcommand::Command SET_DURATION_64TH_TAB_COMMAND("command://notation/set-duration-64th-tab");
    2541              : inline static const muse::rcommand::Command SET_DURATION_128TH_TAB_COMMAND("command://notation/set-duration-128th-tab");
    2542              : inline static const muse::rcommand::Command SET_DURATION_256TH_TAB_COMMAND("command://notation/set-duration-256th-tab");
    2543              : inline static const muse::rcommand::Command SET_DURATION_512TH_TAB_COMMAND("command://notation/set-duration-512th-tab");
    2544              : inline static const muse::rcommand::Command SET_DURATION_1024TH_TAB_COMMAND("command://notation/set-duration-1024th-tab");
    2545              : 
    2546              : inline static const muse::rcommand::Command ENTER_REST_TAB_COMMAND("command://notation/enter-rest-tab");
    2547              : 
    2548              : inline static const muse::rcommand::Command ADD_STANDARD_BEND_COMMAND("command://notation/add-standard-bend");
    2549              : inline static const muse::rcommand::Command ADD_PRE_BEND_COMMAND("command://notation/add-pre-bend");
    2550              : inline static const muse::rcommand::Command ADD_GRACE_NOTE_BEND_COMMAND("command://notation/add-grace-note-bend");
    2551              : inline static const muse::rcommand::Command ADD_SLIGHT_BEND_COMMAND("command://notation/add-slight-bend");
    2552              : inline static const muse::rcommand::Command ADD_DIVE_COMMAND("command://notation/add-dive");
    2553              : inline static const muse::rcommand::Command ADD_PRE_DIVE_COMMAND("command://notation/add-pre-dive");
    2554              : inline static const muse::rcommand::Command ADD_DIP_COMMAND("command://notation/add-dip");
    2555              : inline static const muse::rcommand::Command ADD_SCOOP_COMMAND("command://notation/add-scoop");
    2556              : 
    2557              : inline static const muse::rcommand::Command ADD_HAMMER_ON_PULL_OFF_COMMAND("command://notation/add-hammer-on-pull-off");
    2558              : 
    2559              : inline static const muse::rcommand::Command GOTO_STRING_ABOVE_COMMAND("command://notation/goto-string-above");
    2560              : inline static const muse::rcommand::Command GOTO_STRING_BELOW_COMMAND("command://notation/goto-string-below");
    2561              : 
    2562              : // view commands
    2563              : inline static const muse::rcommand::Command ZOOM_IN_COMMAND("command://notation/view/zoom-in");
    2564              : inline static const muse::rcommand::Command ZOOM_OUT_COMMAND("command://notation/view/zoom-out");
    2565              : inline static const muse::rcommand::Command ZOOM_TO_PAGE_WIDTH_COMMAND("command://notation/view/zoom-to-page-width");
    2566              : inline static const muse::rcommand::Command ZOOM_TO_WHOLE_PAGE_COMMAND("command://notation/view/zoom-to-whole-page");
    2567              : inline static const muse::rcommand::Command ZOOM_TO_TWO_PAGES_COMMAND("command://notation/view/zoom-to-two-pages");
    2568              : inline static const muse::rcommand::Command ZOOM_TO_100_COMMAND("command://notation/view/zoom-to-100");
    2569              : inline static const muse::rcommand::Command ZOOM_TO_PERCENT_COMMAND("command://notation/view/zoom-to-percent"); // with params
    2570              : 
    2571              : inline static const muse::rcommand::Command VIEW_MODE_PAGE_COMMAND("command://notation/view/mode-page");
    2572              : inline static const muse::rcommand::Command VIEW_MODE_FLOAT_COMMAND("command://notation/view/mode-float");
    2573              : inline static const muse::rcommand::Command VIEW_MODE_CONTINUOUS_COMMAND("command://notation/view/mode-continuous");
    2574              : inline static const muse::rcommand::Command VIEW_MODE_SINGLE_COMMAND("command://notation/view/mode-single");
    2575              : 
    2576              : inline static const muse::rcommand::Command NEXT_SCREEN_COMMAND("command://notation/view/next-screen");
    2577              : inline static const muse::rcommand::Command PREV_SCREEN_COMMAND("command://notation/view/prev-screen");
    2578              : inline static const muse::rcommand::Command NEXT_PAGE_COMMAND("command://notation/view/next-page");
    2579              : inline static const muse::rcommand::Command PREV_PAGE_COMMAND("command://notation/view/prev-page");
    2580              : inline static const muse::rcommand::Command TOP_OF_FIRST_PAGE_COMMAND("command://notation/view/top-of-first-page");
    2581              : inline static const muse::rcommand::Command BOTTOM_OF_LAST_PAGE_COMMAND("command://notation/view/bottom-of-last-page");
    2582              : 
    2583              : inline static const muse::rcommand::Command CONTEXT_MENU_OF_SELECTION_COMMAND("command://notation/view/context-menu-of-selection");
    2584              : 
    2585              : inline static const muse::rcommand::Command SHOW_SEARCH_COMMAND("command://notation/view/show-search");
    2586              : 
    2587              : // piano keyboard commands
    2588              : inline static const muse::rcommand::Command PIANO_KEYBOARD_SET_NUMBER_OF_KEYS_COMMAND("command://notation/piano-keyboard/set-number-of-keys");
    2589              : 
    2590              : // diagnostic commands
    2591              : inline static const muse::rcommand::Command DIAGNOSTIC_VIEW_REDRAW_COMMAND("command://notation/diagnostic/view-redraw");
    2592              : 
    2593              : inline static const muse::rcommand::Command SHOW_ELEMENT_BOUNDING_RECTS_COMMAND("command://notation/diagnostic/show-element-bounding-rects");
    2594              : inline static const muse::rcommand::Command COLOR_ELEMENT_SHAPES_COMMAND("command://notation/diagnostic/color-element-shapes");
    2595              : inline static const muse::rcommand::Command SHOW_SEGMENT_SHAPES_COMMAND("command://notation/diagnostic/show-segment-shapes");
    2596              : inline static const muse::rcommand::Command COLOR_SEGMENT_SHAPES_COMMAND("command://notation/diagnostic/color-segment-shapes");
    2597              : inline static const muse::rcommand::Command SHOW_SKYLINES_COMMAND("command://notation/diagnostic/show-skylines");
    2598              : inline static const muse::rcommand::Command SHOW_SYSTEM_BOUNDING_RECTS_COMMAND("command://notation/diagnostic/show-system-bounding-rects");
    2599              : inline static const muse::rcommand::Command SHOW_ELEMENT_MASKS_COMMAND("command://notation/diagnostic/show-element-masks");
    2600              : inline static const muse::rcommand::Command SHOW_LINE_ATTACH_POINTS_COMMAND("command://notation/diagnostic/show-line-attach-points");
    2601              : inline static const muse::rcommand::Command MARK_EMPTY_STAFF_COMMAND("command://notation/diagnostic/mark-empty-staff");
    2602              : inline static const muse::rcommand::Command MARK_CORRUPTED_MEASURES_COMMAND("command://notation/diagnostic/mark-corrupted-measures");
    2603              : inline static const muse::rcommand::Command SHOW_GAP_RESTS_COMMAND("command://notation/diagnostic/show-gap-rests");
    2604              : inline static const muse::rcommand::Command SHOW_ORIGIN_AND_COMBINED_COMMAND("command://notation/diagnostic/show-origin-and-combined");
    2605              : inline static const muse::rcommand::Command CHECK_FOR_SCORE_CORRUPTIONS_COMMAND("command://notation/diagnostic/check-for-score-corruptions");
    2606              : 
    2607              : //! NOTE "Read" commands for MCP and maybe API
    2608              : //inline static const muse::rcommand::Command GET_NOTEINPUT_STATE_COMMAND("command://notation/get-noteinput-state");
    2609              : }
        

Generated by: LCOV version 2.0-1