Skip to content

Commit

Permalink
fix help for :e
Browse files Browse the repository at this point in the history
  • Loading branch information
emicklei committed Oct 14, 2024
1 parent d54a12a commit aba1aff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/note.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ func VelocityToDynamic(v int) string {
case v > VelocityFFF:
return "+++++"
}
return "?"
return ""
}

var fractionRanges = []struct {
Expand Down
5 changes: 4 additions & 1 deletion midi/registry_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ func (r *DeviceRegistry) Command(args []string) notify.Message {
}
return nil
}
if len(args) == 3 && args[0] == "e" {
if args[0] == "e" {
if len(args) != 3 {
return notify.NewErrorf("missing`i` or `o` and device number")
}
if args[1] != "i" && args[1] != "o" {
return notify.NewErrorf("first parameter is either `i` for input or `o` for output")
}
Expand Down

0 comments on commit aba1aff

Please sign in to comment.