Commit graph

10 commits

Author SHA1 Message Date
Takashi Iwai
f0df4b4cfe arecordmidi2: Add stdout output and --silent option
When the output file is '-', it's recorded to stdout.

For avoiding the corruption, this mode also suppresses the messages to
stdout, too, which can be enabled also via -s / --silent option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-09 08:03:27 +02:00
Takashi Iwai
b1269eefdd aplaymidi2: Add --silent option
For suppressing the messages, add -s / --silent option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-09 07:48:05 +02:00
Takashi Iwai
99ce4b1d8a Revert "arecordmidi2: Correct the MIDI FB direction"
This reverts commit e609d66807.

It turned out that the failure was rather in alsa-lib API; the
input and output have been incorrectly implemented.
Now that the alsa-lib code got fixed, let's revert the bad fix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-09 07:32:52 +02:00
Takashi Iwai
68491dd464 aplaymidi2: Show meta data texts
Now aplaymidi2 shows the meta data texts embedded in Flex Data
messages such as copyright and lyrics.  The text output isn't
synchronized yet with the actual position, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-08 18:32:18 +02:00
Takashi Iwai
2ee6c170a8 arecordmidi2: Fix the tick in 1us tempo-base
The recorded tick is incorrectly converted for 1us tempo-base on the
old kernels.  Since we correct the queue tempo, we don't have to
adjust the returned tick value any longer.  The current code applies
it doubly, resulting in 100 times slower.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-08 17:14:06 +02:00
Takashi Iwai
e609d66807 arecordmidi2: Correct the MIDI FB direction
The direction was wrongly passed to the FB setup.  It has to be
"OUTPUT" instead of "INPUT, so that other applications can write to
arecordmidi2 port.

Fixes: 2cdf5ebedb ("arecordmidi2: Add initial version")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-08 16:26:31 +02:00
Takashi Iwai
16533f81de arecordmidi2: Start queue at starting the stream
The queue should be started at the very same time of the start of the
stream itself in the interactive mode.  Otherwise it'll get bogus long
waits until the start of the clip.

Move the code to start the queue in start_bar(), so that it's always
tied with the start sequence.

Fixes: 1205dd5f6c ("arecordmidi2: Add passive mode and interactive mode")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-08 16:26:09 +02:00
Takashi Iwai
1205dd5f6c arecordmidi2: Add passive mode and interactive mode
Allow arecordmidi2 running without specifying the source ports via -p
option.  This will create a UMP Endpoint with the full 16 FBs, and
simply reads from the input ports via subscribers.  User needs to
connect to the ports manually, though.

Also, add -r option to run in the interactive mode.  In the
interactive mode, arecordmidi2 waits for the RETURN key entered from
the terminal to start the recording, and the recording ends after
another RETURN key.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-05 17:20:54 +02:00
Takashi Iwai
2cdf5ebedb arecordmidi2: Add initial version
arecordmidi2 is a similar program like arecordmidi for recording the
incoming MIDI events, but storing in a MIDI Clip file for MIDI 2.0.

Most options are kept from arecordmidi, but some are dropped: namely,
the -l, -m and -f options are dropped for code simplicity.
Also -s option is dropped as well, as there is no need for split for
MIDI Clip file unlike SMF.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-05 17:20:51 +02:00
Takashi Iwai
aa5e949403 aplaymidi2: Add initial version
aplaymidi2 is a program similar like aplaymidi, but intended for
playing back a MIDI Clip file that was introduced for handling UMP.
MIDI Clip file contains UMP packets, and its structure is much simpler
than SMF.

The options are mostly same as aplaymidi, but I omitted -l option for
simplifying the code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2024-07-05 17:20:33 +02:00