@@ -1121,13 +1121,9 @@ def __init__(self):
1121
1121
1122
1122
class BaseDecorationChangeAction (ValueChangeAction ):
1123
1123
def __init__ (self , name , decoration_values , display_name = None ):
1124
- values = []
1125
- for mark in decoration_values :
1126
- value = ValueImageDescription (mark , self .get_image_name (mark ), decoration_to_description [mark ])
1127
- values .append (value )
1124
+ values = [ValueImageDescription (mark , self .get_image_name (mark ), decoration_to_description [mark ]) for mark in decoration_values ]
1128
1125
super (BaseDecorationChangeAction , self ).__init__ (name , values , 'decoration' , display_name = display_name )
1129
1126
1130
-
1131
1127
def is_current_value (self , context , value ):
1132
1128
match = self .get_match (context )
1133
1129
current_value = match .group (self .matchgroup )
@@ -1142,6 +1138,7 @@ def get_values(self, context):
1142
1138
def get_image_name (mark ):
1143
1139
name_lookup = {
1144
1140
'.' : 'staccato' ,
1141
+ '!^!' : 'marcato' ,
1145
1142
'!upbow!' : 'u' ,
1146
1143
'!downbow!' : 'v' ,
1147
1144
'!lowermordent!' : 'mordent' ,
@@ -1322,6 +1319,14 @@ def get_channel_values():
1322
1319
1323
1320
class MidiDrumInstrumentChangeAction (ValueChangeAction ):
1324
1321
values = [
1322
+ ValueDescription ('27' , _ ('High Q' ), common = False ),
1323
+ ValueDescription ('28' , _ ('Slap' ), common = False ),
1324
+ ValueDescription ('29' , _ ('Scratch Push' ), common = False ),
1325
+ ValueDescription ('30' , _ ('Scratch Pull' ), common = False ),
1326
+ ValueDescription ('31' , _ ('Sticks' ), common = False ),
1327
+ ValueDescription ('32' , _ ('Square Click' ), common = False ),
1328
+ ValueDescription ('33' , _ ('Metronome Click' ), common = False ),
1329
+ ValueDescription ('34' , _ ('Metronome Bell' ), common = False ),
1325
1330
ValueDescription ('35' , _ ('Acoustic Bass Drum' )),
1326
1331
ValueDescription ('36' , _ ('Bass Drum 1' )),
1327
1332
ValueDescription ('37' , _ ('Side Stick' )),
@@ -1369,6 +1374,12 @@ class MidiDrumInstrumentChangeAction(ValueChangeAction):
1369
1374
ValueDescription ('79' , _ ('Open Cuica' )),
1370
1375
ValueDescription ('80' , _ ('Mute Triangle' )),
1371
1376
ValueDescription ('81' , _ ('Open Triangle' )),
1377
+ ValueDescription ('82' , _ ('Shaker' ), common = False ),
1378
+ ValueDescription ('83' , _ ('Jingle Bell' ), common = False ),
1379
+ ValueDescription ('84' , _ ('Belltree' ), common = False ),
1380
+ ValueDescription ('85' , _ ('Castanets' ), common = False ),
1381
+ ValueDescription ('86' , _ ('Closed Surdo' ), common = False ),
1382
+ ValueDescription ('87' , _ ('Open Surdo' ), common = False ),
1372
1383
]
1373
1384
def __init__ (self ):
1374
1385
super (MidiDrumInstrumentChangeAction , self ).__init__ ('change_midi_drum_instrument' , MidiDrumInstrumentChangeAction .values , matchgroup = 'druminstrument' , display_name = _ ('Change percussion instrument' ))
@@ -1790,7 +1801,8 @@ class InsertDecorationAction(InsertValueAction):
1790
1801
ValueImageDescription ('!fermata!' , 'fermata' , _ ('Articulation' )),
1791
1802
ValueImageDescription ('!segno!' , 'segno' , _ ('Direction' )),
1792
1803
ValueImageDescription ('P' , 'pralltriller' , _ ('Shortcut symbol' ), common = False ),
1793
- ValueImageDescription ('!5!' , '5' , _ ('Fingering' ), common = False )
1804
+ ValueImageDescription ('!5!' , '5' , _ ('Fingering' ), common = False ),
1805
+ ValueImageDescription ('!editorial!' , 'editorial' , _ ('Accidental' ), common = False ),
1794
1806
]
1795
1807
def __init__ (self , name = 'insert_decoration' , matchgroup = None ):
1796
1808
super (InsertDecorationAction , self ).__init__ (name , InsertDecorationAction .values , matchgroup = matchgroup , display_name = _ ('Insert decoration' ))
@@ -2233,6 +2245,7 @@ class InsertMidiDirectiveAction(InsertValueAction):
2233
2245
values = [
2234
2246
ValueDescription (' program 0 % ' + _ ('Instrument' ), _ ('Set instrument' )),
2235
2247
ValueDescription (' control 7 127 % ' + _ ('Volume' ), _ ('Set volume' )),
2248
+ # ValueDescription(' drum dddd 34 33 33 33 100 100 100 100 % {0}\n%%MIDI drumon'.format(_('Metronome')), _('Turn on metronome')),
2236
2249
ValueDescription (os .linesep .join (play_chords_cmds ), _ ('Play chords' )),
2237
2250
]
2238
2251
def __init__ (self ):
@@ -2333,7 +2346,7 @@ class InsertAppendFieldActionEmptyLineAction(InsertValueAction):
2333
2346
ValueDescription ('w:' , name_to_display_text ['words (note aligned)' ]),
2334
2347
ValueDescription ('W:' , name_to_display_text ['words (at the end)' ], common = False ),
2335
2348
ValueDescription ('s:' , name_to_display_text ['symbol line' ], common = False ),
2336
- ValueDescription (r'%%' , name_to_display_text ['instruction' ], common = False ),
2349
+ ValueDescription (r'%%' , name_to_display_text ['instruction' ]),
2337
2350
]
2338
2351
def __init__ (self ):
2339
2352
super (InsertAppendFieldActionEmptyLineAction , self ).__init__ ('insert_append_field_on_empty_line' , InsertAppendFieldActionEmptyLineAction .values , display_name = _ ('Add...' ))
0 commit comments