Skip to content

Commit

Permalink
aseqdump: Fix bogus velocity value output in UMP MIDI2 mode
Browse files Browse the repository at this point in the history
The printf format for a normalized velocity in MIDI2 mode had a typo,
resulting in a bogus value.  Fix it.

Fixes: 7e9bebad0b199 ("aseqdump: Add options to switch view mode")
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jul 20, 2024
1 parent 176c945 commit cdcfcdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seq/aseqdump/aseqdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static const char *midi2_velocity(unsigned int v)
snprintf(tmp, sizeof(tmp), "%.2f",
((double)v * 64.0) / 0x8000);
else
snprintf(tmp, sizeof(tmp), ".2%f",
snprintf(tmp, sizeof(tmp), "%.2f",
((double)(v - 0x8000) * 63.0) / 0x7fff + 64.0);
return tmp;
} else if (view_mode == VIEW_PERCENT) {
Expand Down

0 comments on commit cdcfcdd

Please sign in to comment.