Skip to content

Commit

Permalink
add meta cmds symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviergodart committed Dec 2, 2024
1 parent 138fcbf commit fd56b76
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/music/note.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,24 @@ func (n *Note) Symbol() string {
} else if n.Key.amount != 0 {
keySymbol = "\u033c"
}
controlsTypeNb := 0
for _, c := range n.Controls {
if c.Type != SilentControlType {
paramSymbol = "\u0307"
controlsTypeNb += 1
break
}
}
for _, c := range n.MetaCommands {
if c.Active() {
paramSymbol += "\u030A"
controlsTypeNb += 1
break
}
}
switch controlsTypeNb {
case 1:
paramSymbol = "\u0307"
case 2:
paramSymbol = "\u0308"
}
return fmt.Sprintf("%s%s", keySymbol, paramSymbol)
}

0 comments on commit fd56b76

Please sign in to comment.