History log of /netbsd-current/usr.bin/midiplay/midiplay.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.34 27-Nov-2021 rillig

usr.bin: remove unnecessary CONSTCOND, lint no longer needs it

Since 2021-01-31, lint no longer requires a CONSTCOND comment in a
do-while-0 statement since this is a common code pattern, especially in
statement-like macros.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.33 01-Feb-2019 mrg

make a fallthru comment GCC7 compatible.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.32 03-May-2018 wiz

branches: 1.32.2;
Sync usage with manpage.


# 1.31 03-May-2018 mrg

if just parsing don't try to read the uninitialised device name,
or display the unit number.

add a "-s" option that sends an ALL_SOUNDS_OFF midi event. very
useful after an interrupted midiplay leaves notes on.


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.30 22-Mar-2015 mrg

branches: 1.30.8; 1.30.14;
if not playing (-q mode), don't call ioctl() or try to use the results.
now -q mode works.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.29 25-Nov-2011 jmcneill

branches: 1.29.18;
- accept "midi0" as an alias for "0" to the -d flag
- verify that the requested unit exists before playing
- if the verbose flag is set, print the selected device name and unit #


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.28 14-Aug-2011 christos

branches: 1.28.2;
- add a SYSEX0 macro that does not override the initializers and use it
- fix whitespace
- make things static and eliminate unused functions


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.27 12-Apr-2009 lukem

fix sign-compare and cast-qual issues


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.26 28-Apr-2008 martin

branches: 1.26.8;
Remove clause 3 and 4 from TNF licenses


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.25 01-Jul-2006 he

branches: 1.25.18;
Um, pointer differences are ptrdiff_t, and there's already a
printf specifier for it (t), so use it instead.


# 1.24 01-Jul-2006 he

The type for pointer difference varies between ports, on some it's
"long int" and on others "int", so cast via long and use %ld for printing.


# 1.23 30-Jun-2006 chap

The rest of merge from chap-midi branch. Version of midiplay that uses the
sequencer API definitions in sys/midiio.h (so there is a use example).
These produce the same (ABI) sequencer events as the OSS macros, but in
a more strongly-typed way; OSS API macros could be built on them and added
to the OSS compatibility header sys/soundcard.h but have not been, yet.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 chap-midi-nbase netbsd-3-0-1-RELEASE chap-midi-base netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.22 05-Jan-2004 jmmv

branches: 1.22.12;
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.


# 1.21 16-Oct-2003 itojun

safer use of realloc


# 1.20 26-Jul-2003 salo

netbsd.org->NetBSD.org


# 1.19 23-Jun-2003 agc

Add NetBSD RCS Ids.


# 1.18 17-Feb-2003 augustss

Make it play RMID files as well. From bin/20388, Quentin Garnier.


Revision tags: fvdl_fs64_base
# 1.17 11-Jun-2002 itojun

err/errx/warn/warnx do not need \n at the end


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.16 05-Jan-2002 augustss

Take the default output unit from env MIDIUNIT.


# 1.15 25-Nov-2001 augustss

Don't open sequencer device if we're not going to play.


# 1.14 30-Oct-2001 augustss

Make -p select the right program. Fixes PR 14402, from itohy@netbsd.org.


# 1.13 07-Apr-2001 tshiozak

fix a simple, but important bug for system exclusive messages.
(forgot to increase a pointer, if the message has over 6 bytes length.)


# 1.12 19-Feb-2001 cgd

convert to use getprogname()


# 1.11 12-Aug-2000 augustss

Cosmetic changes.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.10 18-Feb-2000 augustss

Add a -p flag to set the MIDI program. From lindroos@nls.fi.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.9 11-Oct-1999 augustss

Fix timer reset bug when playing multiple songs.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 25-Nov-1998 augustss

branches: 1.8.4;
Make the copyright header conform to the NetBSD template.


# 1.7 20-Oct-1998 augustss

Add f flag to getopt() argument. Fixes PR 6335.
From Andreas Wrede <andreas@planix.com>


# 1.6 13-Aug-1998 augustss

Handle SYSEX events.


# 1.5 13-Aug-1998 augustss

Improve man page.


# 1.4 13-Aug-1998 augustss

Handle MIDI files with running status correctly.


# 1.3 13-Aug-1998 augustss

Fix type that prevented program and controller changes.


# 1.2 12-Aug-1998 augustss

Make user tempo setting more sane.


# 1.1 12-Aug-1998 augustss

Add a very simple MIDI player. No features, no fluff.


# 1.33 01-Feb-2019 mrg

make a fallthru comment GCC7 compatible.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521
# 1.32 03-May-2018 wiz

Sync usage with manpage.


# 1.31 03-May-2018 mrg

if just parsing don't try to read the uninitialised device name,
or display the unit number.

add a "-s" option that sends an ALL_SOUNDS_OFF midi event. very
useful after an interrupted midiplay leaves notes on.


Revision tags: pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.30 22-Mar-2015 mrg

branches: 1.30.8; 1.30.14;
if not playing (-q mode), don't call ioctl() or try to use the results.
now -q mode works.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.29 25-Nov-2011 jmcneill

branches: 1.29.18;
- accept "midi0" as an alias for "0" to the -d flag
- verify that the requested unit exists before playing
- if the verbose flag is set, print the selected device name and unit #


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.28 14-Aug-2011 christos

branches: 1.28.2;
- add a SYSEX0 macro that does not override the initializers and use it
- fix whitespace
- make things static and eliminate unused functions


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.27 12-Apr-2009 lukem

fix sign-compare and cast-qual issues


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.26 28-Apr-2008 martin

branches: 1.26.8;
Remove clause 3 and 4 from TNF licenses


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.25 01-Jul-2006 he

branches: 1.25.18;
Um, pointer differences are ptrdiff_t, and there's already a
printf specifier for it (t), so use it instead.


# 1.24 01-Jul-2006 he

The type for pointer difference varies between ports, on some it's
"long int" and on others "int", so cast via long and use %ld for printing.


# 1.23 30-Jun-2006 chap

The rest of merge from chap-midi branch. Version of midiplay that uses the
sequencer API definitions in sys/midiio.h (so there is a use example).
These produce the same (ABI) sequencer events as the OSS macros, but in
a more strongly-typed way; OSS API macros could be built on them and added
to the OSS compatibility header sys/soundcard.h but have not been, yet.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 chap-midi-nbase netbsd-3-0-1-RELEASE chap-midi-base netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.22 05-Jan-2004 jmmv

branches: 1.22.12;
Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.


# 1.21 16-Oct-2003 itojun

safer use of realloc


# 1.20 26-Jul-2003 salo

netbsd.org->NetBSD.org


# 1.19 23-Jun-2003 agc

Add NetBSD RCS Ids.


# 1.18 17-Feb-2003 augustss

Make it play RMID files as well. From bin/20388, Quentin Garnier.


Revision tags: fvdl_fs64_base
# 1.17 11-Jun-2002 itojun

err/errx/warn/warnx do not need \n at the end


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.16 05-Jan-2002 augustss

Take the default output unit from env MIDIUNIT.


# 1.15 25-Nov-2001 augustss

Don't open sequencer device if we're not going to play.


# 1.14 30-Oct-2001 augustss

Make -p select the right program. Fixes PR 14402, from itohy@netbsd.org.


# 1.13 07-Apr-2001 tshiozak

fix a simple, but important bug for system exclusive messages.
(forgot to increase a pointer, if the message has over 6 bytes length.)


# 1.12 19-Feb-2001 cgd

convert to use getprogname()


# 1.11 12-Aug-2000 augustss

Cosmetic changes.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.10 18-Feb-2000 augustss

Add a -p flag to set the MIDI program. From lindroos@nls.fi.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.9 11-Oct-1999 augustss

Fix timer reset bug when playing multiple songs.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 25-Nov-1998 augustss

branches: 1.8.4;
Make the copyright header conform to the NetBSD template.


# 1.7 20-Oct-1998 augustss

Add f flag to getopt() argument. Fixes PR 6335.
From Andreas Wrede <andreas@planix.com>


# 1.6 13-Aug-1998 augustss

Handle SYSEX events.


# 1.5 13-Aug-1998 augustss

Improve man page.


# 1.4 13-Aug-1998 augustss

Handle MIDI files with running status correctly.


# 1.3 13-Aug-1998 augustss

Fix type that prevented program and controller changes.


# 1.2 12-Aug-1998 augustss

Make user tempo setting more sane.


# 1.1 12-Aug-1998 augustss

Add a very simple MIDI player. No features, no fluff.