Skip to content

Commit fd56b76

Browse files
committed
add meta cmds symbol
1 parent 138fcbf commit fd56b76

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

core/music/note.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -221,17 +221,24 @@ func (n *Note) Symbol() string {
221221
} else if n.Key.amount != 0 {
222222
keySymbol = "\u033c"
223223
}
224+
controlsTypeNb := 0
224225
for _, c := range n.Controls {
225226
if c.Type != SilentControlType {
226-
paramSymbol = "\u0307"
227+
controlsTypeNb += 1
227228
break
228229
}
229230
}
230231
for _, c := range n.MetaCommands {
231232
if c.Active() {
232-
paramSymbol += "\u030A"
233+
controlsTypeNb += 1
233234
break
234235
}
235236
}
237+
switch controlsTypeNb {
238+
case 1:
239+
paramSymbol = "\u0307"
240+
case 2:
241+
paramSymbol = "\u0308"
242+
}
236243
return fmt.Sprintf("%s%s", keySymbol, paramSymbol)
237244
}

0 commit comments

Comments
 (0)