Commit graph

27 commits

Author SHA1 Message Date
Jaroslav Kysela
1314abd2d6 amidi: optarg might be NULL, fix 't' argument parsing 2017-02-27 09:04:08 +01:00
Felipe F. Tonello
b59745978f amidi: add sysex-interval option
This patch adds a new option to amidi tool: sysex-interval.

It adds a delay (in milliseconds) in between each SysEx message - it searches
for a 0xF7 byte.

This is very useful when sending firmware updates to a remote device via SysEx
or any other use that requires this delay in between SysEx messages.

`amidi' manual was updated with an example usage as well.

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-13 18:19:19 +02:00
Clemens Ladisch
a6e9a8da9e amidi: fix timeout handling
The timeout is not supposed to expire when ignored messages are
received.  This cannot be handled with the poll() timeout, so add
a separate timer.

Reported-by: Martin Tarenskeen <m.tarenskeen@gmail.com>
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-22 11:18:58 +02:00
Clemens Ladisch
04322ca749 amidi: ignore not only Active Sensing but also Clock bytes
Active Sensing messages are sent by many devices in the background and
would only interfere with the actual messages that amidi is supposed to
capture.  Therefore, amidi ignores them by default.  However, there are
also devices that send Clock messages with the same problem, so it is
a better idea to filter them out, too.

Reported-by: Martin Tarenskeen <m.tarenskeen@gmail.com>
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-22 11:18:48 +02: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
Jordi Mallach
093a371a27 Several formatting fixes for manpages.
Fix many occurrences of unescaped “-”.
Fix minor English issue.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:38:13 +02:00
Clemens Ladisch
c2eaf88f7e amidi: fix port listing
Rewrite the port listing code because it was too complex and had some
bugs when handling write-only or read-only ports.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-01-25 14:11:37 +01: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
Diego E. 'Flameeyes' Pettenò
ca1ea1e904 Mark static the functions not used outside their unit.
This way the compiler can assume more information about their
interface for optimisation.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 13:09:56 +01:00
Clemens Ladisch
2d470cf9c1 amidi: open devices non-blockingly
Open the RawMIDI devices in non-blocking mode so that we do not hang
while a device is busy.
2007-04-17 09:25:01 +02:00
Clemens Ladisch
7bae1b0a5b amidi: fix --list-devices
Fix the formatting of devices with several unnamed subdevices,
and show input/outputness for these, too.
2006-06-27 08:19:15 +02:00
Takashi Iwai
6764ddbd53 amidi: Fix device list
From: Matthias Koenig <mk@phasorlab.de>

amidi does not show all devices with the --list-devices option.
It assumes that all output ports equals input ports and does not
show an input only port.
This patch extends the output of amidi -l by one column which shows
the input/output direction of each port.
E.g.

zebra:amidi # ./amidi -l
Dir Device    Name
IO  hw:1,0    MPU-401 MIDI 1-0
IO  hw:2,0,0  Keystation MIDI 1
IO  hw:3,0,0  Miditerminal 1
IO  hw:3,0,1  Miditerminal 2
IO  hw:3,0,2  Miditerminal 3
IO  hw:3,0,3  Miditerminal 4
I   hw:3,0,4  Miditerminal SMPTE
2006-06-23 14:53:38 +02:00
Takashi Iwai
87ffccedfd Fix / clean up man pages
Fix / clean up man pages (bug#1386)
2005-09-02 17:36:40 +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
Clemens Ladisch
556364bbaf detect attempts to play .mid files with amidi
Complain when the user attempts to play .mid files with amidi.
2005-03-14 15:13:48 +00:00
Clemens Ladisch
44cb75c764 fix amidi error handling
Fix error handling when the input file cannot be loaded.
2005-03-14 15:11:45 +00:00
Clemens Ladisch
3e7f43d52a use non-breaking hyphens in man page
Replace - with \- where breaking hyphens are not intended.
2005-02-21 08:18:58 +00:00
Clemens Ladisch
c44463f841 fix buffer length calculation
The send_hex buffer length has to include the separating space, too.
2005-02-16 10:03:52 +00:00
Clemens Ladisch
d7d4a53d59 clarify options in man page
Actually show an overview of the options instead of saying "amidi options".
2005-02-16 09:54:28 +00:00
Clemens Ladisch
5df127e3f3 allow --send-hex data without quotes
Now all non-option arguments are read as data for the -S option,
instead of requiring exactly one argument for -S.

This fixes the bug that when specifying multiple bytes for the -S
option separated with spaces but without quoting, amidi would silently
ignore all but the first byte.
2005-02-16 09:52:25 +00:00
Nicolas FRANCOIS
ca5f8cbcfe Fix hyphens in man pages
This patch converts hyphens to minus signs in the man pages (for options,
emails, or command line examples).

This patch also closes one font modifier in iecset.1.
(s/\fIfalse\fI,/\fIfalse\fP,/)

Signed-off-by: Nicolas FRANCOIS <nicolas.francois@centraliens.net>
2004-10-08 16:15:34 +00:00
Clemens Ladisch
ce70bf037a manpages: remove bogus .ID macro, use .TP for examples 2004-07-09 07:09:28 +00:00
Jaroslav Kysela
1ae3fa8532 Clemens Ladisch <clemens@ladisch.de>
add aplaymidi & arecordmidi utilities
2004-02-23 10:58:34 +00:00
Takashi Iwai
e24a1cb4f9 Clemens Ladisch <clemens@ladisch.de>:
- This adds an option to amidi not to ignore active sensing bytes.
2004-01-19 18:39:12 +00:00
Takashi Iwai
87873452ce Clemens Ladisch <clemens@ladisch.de>:
- set file permission bits for output file
2004-01-13 16:11:56 +00:00
Jaroslav Kysela
80476a0170 - changes against PCM API switch
- 1.0.0 version
- fixed amidi warning
2003-11-05 11:08:25 +00:00
Takashi Iwai
e90417e3fd - added amidi utility by Clemens Ladisch <clemens@ladisch.de>
- fixed .cvsignore and README
2003-10-28 10:53:43 +00:00