Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src Pull up following revision(s) (requested by mrg in ticket...
details: https://anonhg.NetBSD.org/src/rev/50898a08e19b
branches: netbsd-7
changeset: 798824:50898a08e19b
user: martin <martin%NetBSD.org@localhost>
date: Mon Jan 12 10:22:22 2015 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #409):
usr.bin/midirecord/Makefile: revision 1.1
usr.bin/midirecord/midirecord.1: revision 1.1-1.3
usr.bin/midirecord/midirecord.c: revision 1.1-1.6
usr.bin/Makefile: revision 1.219
distrib/sets/lists/base/mi: revision 1.1093
distrib/sets/lists/man/mi: revision 1.1492
distrib/sets/lists/debug/mi: revision 1.98
Add midirecord.
diffstat:
distrib/sets/lists/base/mi | 3 +-
distrib/sets/lists/debug/mi | 3 +-
distrib/sets/lists/man/mi | 5 +-
usr.bin/Makefile | 8 +-
usr.bin/midirecord/Makefile | 15 +
usr.bin/midirecord/midirecord.1 | 125 ++++++
usr.bin/midirecord/midirecord.c | 802 ++++++++++++++++++++++++++++++++++++++++
7 files changed, 954 insertions(+), 7 deletions(-)
diffs (truncated from 1043 to 300 lines):
diff -r 6761c4309029 -r 50898a08e19b distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi Mon Jan 12 10:02:29 2015 +0000
+++ b/distrib/sets/lists/base/mi Mon Jan 12 10:22:22 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1087.2.1 2014/11/18 18:32:29 snj Exp $
+# $NetBSD: mi,v 1.1087.2.2 2015/01/12 10:22:22 martin Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@@ -593,6 +593,7 @@
./usr/bin/merge base-util-bin
./usr/bin/mesg base-util-bin
./usr/bin/midiplay base-audio-bin
+./usr/bin/midirecord base-audio-bin
./usr/bin/mixerctl base-audio-bin
./usr/bin/mk_cmds base-obsolete obsolete
./usr/bin/mkcsmapper base-util-bin
diff -r 6761c4309029 -r 50898a08e19b distrib/sets/lists/debug/mi
--- a/distrib/sets/lists/debug/mi Mon Jan 12 10:02:29 2015 +0000
+++ b/distrib/sets/lists/debug/mi Mon Jan 12 10:22:22 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.81.2.1 2014/08/15 12:26:56 martin Exp $
+# $NetBSD: mi,v 1.81.2.2 2015/01/12 10:22:22 martin Exp $
./etc/mtree/set.debug comp-sys-root
./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib
@@ -616,6 +616,7 @@
./usr/libdata/debug/usr/bin/merge.debug comp-util-debug debug
./usr/libdata/debug/usr/bin/mesg.debug comp-util-debug debug
./usr/libdata/debug/usr/bin/midiplay.debug comp-audio-debug debug
+./usr/libdata/debug/usr/bin/midirecord.debug comp-audio-debug debug
./usr/libdata/debug/usr/bin/mixerctl.debug comp-audio-debug debug
./usr/libdata/debug/usr/bin/mk_cmds.debug comp-obsolete obsolete
./usr/libdata/debug/usr/bin/mkcsmapper.debug comp-util-debug debug
diff -r 6761c4309029 -r 50898a08e19b distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Mon Jan 12 10:02:29 2015 +0000
+++ b/distrib/sets/lists/man/mi Mon Jan 12 10:22:22 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1485.2.4 2014/12/12 16:38:48 martin Exp $
+# $NetBSD: mi,v 1.1485.2.5 2015/01/12 10:22:22 martin Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -319,6 +319,7 @@
./usr/share/man/cat1/merge.0 man-util-catman .cat
./usr/share/man/cat1/mesg.0 man-util-catman .cat
./usr/share/man/cat1/midiplay.0 man-audio-catman .cat
+./usr/share/man/cat1/midirecord.0 man-audio-catman .cat
./usr/share/man/cat1/mixerctl.0 man-audio-catman .cat
./usr/share/man/cat1/mkdep.0 man-c-catman .cat
./usr/share/man/cat1/mkdir.0 man-util-catman .cat
@@ -3436,6 +3437,7 @@
./usr/share/man/html1/merge.html man-util-htmlman html
./usr/share/man/html1/mesg.html man-util-htmlman html
./usr/share/man/html1/midiplay.html man-audio-htmlman html
+./usr/share/man/html1/midirecord.html man-audio-htmlman html
./usr/share/man/html1/mixerctl.html man-audio-htmlman html
./usr/share/man/html1/mkdep.html man-c-htmlman html
./usr/share/man/html1/mkdir.html man-util-htmlman html
@@ -6192,6 +6194,7 @@
./usr/share/man/man1/merge.1 man-util-man .man
./usr/share/man/man1/mesg.1 man-util-man .man
./usr/share/man/man1/midiplay.1 man-audio-man .man
+./usr/share/man/man1/midirecord.1 man-audio-man .man
./usr/share/man/man1/mixerctl.1 man-audio-man .man
./usr/share/man/man1/mkdep.1 man-c-man .man
./usr/share/man/man1/mkdir.1 man-util-man .man
diff -r 6761c4309029 -r 50898a08e19b usr.bin/Makefile
--- a/usr.bin/Makefile Mon Jan 12 10:02:29 2015 +0000
+++ b/usr.bin/Makefile Mon Jan 12 10:22:22 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.218 2014/08/01 14:01:30 christos Exp $
+# $NetBSD: Makefile,v 1.218.2.1 2015/01/12 10:22:22 martin Exp $
# from: @(#)Makefile 8.3 (Berkeley) 1/7/94
.include <bsd.own.mk>
@@ -16,9 +16,9 @@
head hexdump iconv id indent infocmp innetgr ipcrm ipcs join jot \
kdump ktrace ktruss lam last lastcomm ldd leave \
locale locate lock logger login logname look lorder m4 \
- machine mail make man menuc mesg midiplay mixerctl mkcsmapper \
- mkdep mkesdb mkfifo mklocale mkstr mktemp mkubootimage moduli \
- msgc msgs \
+ machine mail make man menuc mesg midiplay midirecord mixerctl \
+ mkcsmapper mkdep mkesdb mkfifo mklocale mkstr mktemp mkubootimage \
+ moduli msgc msgs \
nbperf netgroup netstat newgrp newsyslog nfsstat nice nl nohup \
pagesize passwd paste patch pathchk pkill pmap pmc pr \
printenv printf progress pwhash qsubst quota radioctl rdist \
diff -r 6761c4309029 -r 50898a08e19b usr.bin/midirecord/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/midirecord/Makefile Mon Jan 12 10:22:22 2015 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1.2.2 2015/01/12 10:22:22 martin Exp $
+
+PROG= midirecord
+
+.include <bsd.own.mk>
+
+LIBAUDIO != cd ${.CURDIR}/../audio/common && ${PRINTOBJDIR}
+CPPFLAGS+=-I${.CURDIR}/../audio/common
+DPADD+= ${LIBAUDIO}/libaudio.a
+LDADD+= -L${LIBAUDIO} -laudio
+
+DPADD+= ${LIBUTIL}
+LDADD+= -lutil
+
+.include <bsd.prog.mk>
diff -r 6761c4309029 -r 50898a08e19b usr.bin/midirecord/midirecord.1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/midirecord/midirecord.1 Mon Jan 12 10:22:22 2015 +0000
@@ -0,0 +1,125 @@
+.\" $NetBSD: midirecord.1,v 1.3.2.2 2015/01/12 10:22:22 martin Exp $
+.\"
+.\" Copyright (c) 1998, 1999, 2001, 2002, 2010 Matthew R. Green
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd December 30, 2014
+.Dt MIDIRECORD 1
+.Os
+.Sh NAME
+.Nm midirecord
+.Nd record midi files
+.Sh SYNOPSIS
+.Nm
+.Op Fl aDfhoqV
+.Op Fl B Ar buffersize
+.Op Fl c Ar channels
+.Op Fl d Ar devices
+.Op Fl f Ar sequencerdev
+.Op Fl n Ar notesperbeat
+.Op Fl r Ar raw_output
+.Op Fl T Ar tempo
+.Op Fl t Ar time
+.Ar file
+.Sh DESCRIPTION
+The
+.Nm
+program converts the sequencer events read on
+.Ar sequencerdev
+to the named MIDI SMF output.
+If the file name is \-, output will go to the standard output.
+By default, timing for events begins with the first event.
+The
+.Fl o
+flag may be used to start timing events at the process start up.
+.Sh OPTIONS
+The following options are available:
+.Bl -tag -width XnXnotesperbeatX
+.It Fl a
+Append to the specified file, rather than overwriting.
+.It Fl B Ar buffersize
+Set the sequencer device read buffer size to
+.Ar buffersize .
+The default value is 32768 bytes.
+.It Fl c Ar channels
+Sets the filter list of channels to
+.Ar channels ,
+which is a comma separated list of channels to filter in.
+.It Fl D
+Enable debug log.
+.It Fl d Ar devices
+Sets the filter list of devices to
+.Ar devices ,
+which is a comma separated list of devices to filter in.
+.It Fl f Ar sequencerdev
+Sets the sequencer device to use to
+.Ar sequencerdev .
+The default is
+.Pa /dev/music .
+.It Fl h
+Print a help message.
+.It Fl n Ar notesperbeat
+Sets the MIDI notes (clocks) per beat to
+.Ar notesperbeat .
+.It Fl o
+Start the relative timer at process start up instead of at
+the first event.
+.It Fl q
+Be quiet.
+.It Fl r Ar raw_output
+Create the raw output of the sequencer device in
+.Ar raw_output .
+.It Fl T Ar tempo
+Set the tempo for the recording to
+.Ar tempo .
+.It Fl t Ar time
+Sets the maximum amount of time to record.
+Format is [hh:]mm:ss[.dddddd].
+.It Fl V
+Be verbose.
+.El
+.Sh ENVIRONMENT
+.Bl -tag -width MIDIDEVICE
+.It Ev MIDIDEVICE
+the midi device to be used.
+.El
+.Sh SEE ALSO
+.Xr midiplay 1 ,
+.Xr midi 4 ,
+.Xr sequencer 4
+.Sh HISTORY
+The
+.Nm
+program was first seen in
+.Nx 8 .
+.Sh AUTHORS
+The
+.Nm
+program was written by
+.An Matthew R. Green Aq Mt mrg%eterna.com.au@localhost .
+.Sh BUGS
+SYSEX, LOCAL and FULLSIZE messages are not currently handled, but the
+.Nx
+.Xr sequencer 4
+device does not generate them.
diff -r 6761c4309029 -r 50898a08e19b usr.bin/midirecord/midirecord.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/midirecord/midirecord.c Mon Jan 12 10:22:22 2015 +0000
@@ -0,0 +1,802 @@
+/* $NetBSD: midirecord.c,v 1.6.2.2 2015/01/12 10:22:22 martin Exp $ */
+
+/*
+ * Copyright (c) 2014 Matthew R. Green
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * midirecord(1), similar to audiorecord(1).
+ */
+
+#include <sys/cdefs.h>
+
+#ifndef lint
+__RCSID("$NetBSD: midirecord.c,v 1.6.2.2 2015/01/12 10:22:22 martin Exp $");
+#endif
+
+#include <sys/param.h>
+#include <sys/midiio.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/uio.h>
+
+#include <err.h>
+#include <errno.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <paths.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <util.h>
+#include <assert.h>
+#include <stdbool.h>
+
+#include "libaudio.h"
Home |
Main Index |
Thread Index |
Old Index