Skip to content

Commit f71bf17

Browse files
committed
Minor fixes
1 parent 65be40c commit f71bf17

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tune_actions.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ def append_current_value_to_rows(self, context, rows):
234234
if self.show_current_value:
235235
current_value = self.get_current_value(context)
236236
if current_value and current_value.strip():
237-
description = next([v.description for v in self.get_values(context) if v.value == current_value])
238-
if description:
239-
text = description
237+
descriptions = [v.description for v in self.get_values(context) if v.value == current_value]
238+
if descriptions:
239+
text = descriptions[0]
240240
else:
241241
text = current_value
242242

tune_elements.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,8 @@ def __init__(self):
611611
for section in ABC_SECTIONS:
612612
self._search_pattern[section] = AbcMidiDrumMapDirective.pattern
613613

614-
615614
class AbcMidiVolumeDirective(AbcElement):
616-
pattern = r"(?m)^(?:%%|I:)MIDI control 7 (?P<volume>\d*)" + AbcElement.rest_of_line_pattern
615+
pattern = r"(?m)^(?:%%|I:)MIDI (?:control 7|chordvol|bassvol) (?P<volume>\d*)" + AbcElement.rest_of_line_pattern
617616
def __init__(self):
618617
super(AbcMidiVolumeDirective, self).__init__('MIDI_volume', display_name=_('Volume'), description=_('Volume for current voice.'))
619618
for section in ABC_SECTIONS:

0 commit comments

Comments
 (0)