Commit graph

21 commits

Author SHA1 Message Date
Takashi Iwai
cecc383aeb aseqdump: Add dump for UMP Utility and System messages
Add the dump functions for UMP Type 0 (Utility) and Type 1 (System)
messages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-05-31 14:30:43 +02:00
Jaroslav Kysela
66112d60e4 seq: use ATTRIBUTE_UNUSED instead remove argument name
We need to support older compilers than GCC 11.

Link: https://github.com/alsa-project/alsa-utils/issues/233
Fixes: 181e190 ("aplaymidi: fix the verbose compilation warnings for latest gcc")
Fixes: a03377a ("aseqnet: fix the verbose compilation warnings for latest gcc")
Fixes: 429c32a ("aseqdump: fix the verbose compilation warnings for latest gcc")
Fixes: 0b48dd6 ("aconnect: fix the verbose compilation warnings for latest gcc")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-04 16:54:14 +02:00
Jaroslav Kysela
feb9c4cdec reshuffle included files to include config.h as first
config.h may contain defines like _FILE_OFFSET_BITS which influence
the system wide include files (off_t types, open -> open64 function
usage etc.).

Related: https://github.com/alsa-project/alsa-utils/pull/223
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 18:48:23 +02:00
Jaroslav Kysela
5201ec026d aseqdump: fix MIDI 2.0 code - it compiles now
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:56:06 +02:00
Jaroslav Kysela
429c32a2ec aseqdump: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:58:11 +02:00
Takashi Iwai
7e9bebad0b aseqdump: Add options to switch view mode
This patch adds to switch the operation mode of aseqdump to specify
how the values are shown.  Namely, it allows to show the MIDI 2.0
values in two more different ways: compatible "normalized" view and
percentage view, in addition to the default "raw" view.

The "raw" view mode just shows the value found in the event almost as
is.  The MIDI 2.0 values are shown in 16 or 32bit hex numbers.
The channel and UMP group numbers are 0-based, taking from 0 to 15.

OTOH, in the normalized view, the 16bit or 32bit velocity and data
values of MIDI 2.0 are normalized to the value fit in MIDI 1.0,
i.e. from 0 to 127, but with decimal points.  Similarly, the pitch
wheel values are normalized between -8192 to 8191.
Also, the channel numbers and UMP group numbers are 1-based, taking
from 1 to 16.

In the percentage view, the velocity and data values are normalized
and shown in percentage, from 0% to 100%.  The pitch wheel is
normalized from -100% to 100%.  The channel and UMP groups are 1-based
as well as in normalized view mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28 16:44:45 +02:00
Takashi Iwai
ad09344d4c aseqdump: Correct wrong channel number
Correct the wrong value shown in MIDI2 default output (status instead
of channel).  Also adjust the printf formats to use %2d consistently
for the channel numbers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28 16:44:45 +02:00
Takashi Iwai
8703c08978 aseqdump: Align outputs of UMP MIDI 1.0 with legacy MIDI 1.0
The outputs from UMP MIDI 1.0 are slightly differently shown as the
legacy MIDI 1.0 (the velocities and values are in hex), which is
rather confusing.  Let's make them look more similar.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28 16:44:45 +02:00
Takashi Iwai
2b08d585a3 aseqdump: Add UMP support
Add the support for showing the UMP events to aseqdump.
With the new option -u, the program can start as a UMP sequencer
client and receive UMP events instead of the legacy MIDI events.

Also, the automatic event conversion among legacy and UMP clients can
be suppressed by the new -r option, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:44:57 +02:00
Michael Forney
cb47f6dcf4 Avoid empty initializer list
To zero-initialize an object, use `{0}` instead.

Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-02-10 12:39:43 +01:00
Rosen Penev
5e6df5ae4b treewide: sys/poll to poll
Fixes warning on musl:

warning redirecting incorrect #include <sys/poll.h> to <poll.h>

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-11-20 19:44:02 +01:00
Jaroslav Kysela
b1e3d945b7 Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:28:53 +01:00
Jaroslav Kysela
0a6c9e80f7 Makefiles - use AM_CPPFLAGS instead INCLUDES
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 10:55:59 +02:00
Diego E. 'Flameeyes' Pettenò
6232f1c96c Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.

The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 13:10:02 +01:00
Clemens Ladisch
8e2046bed5 aseqdump: flush output
Flush the output after all currently available events have been printed
to allow filtering interactive output through a pipe.
2008-02-21 09:12:53 +01:00
Clemens Ladisch
23f3e570cc fix poll timeout
Use an infinite poll timeout to prevent unnecessary wakeups.
2008-02-21 09:12:27 +01:00
Clemens Ladisch
8497258145 aseqdump: increase verbosity
Include the names of parameters when printing events instead of just
showing the raw values.
2008-02-21 09:11:58 +01:00
Clemens Ladisch
e6cbac57f6 aseqdump - remove fishy comment
Remove the fishy comment because it isn't needed anymore after the tuna
has been accidentally removed.
2005-07-25 15:20:07 +00:00
Takashi Iwai
39ff48b437 Output help messages to stdout
Output help messages and lists to stdout instead of stderr.
2005-06-23 10:39:16 +00:00
Takashi Iwai
6343f35202 i18nize some programs
i18nize some programs with gettext.
2005-06-23 10:38:06 +00:00
Clemens Ladisch
51b48adbaa move event dumping from arecordmidi to aseqdump
Remove the event dumping functionality from arecordmidi and
put it into the new aseqdump utility.
2005-02-21 08:30:12 +00:00