From 4fe8b4e6529bf7c89a11326eb086a795face7af6 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 30 Dec 2014 18:52:47 +0000 Subject: [PATCH] - this is midirecord(1) not midiorecord(1) - add the -o handling to the getopt() and man page - bump date --- usr.bin/midirecord/midirecord.1 | 15 +++++++++++---- usr.bin/midirecord/midirecord.c | 6 +++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/usr.bin/midirecord/midirecord.1 b/usr.bin/midirecord/midirecord.1 index 9610f500e2e2..152256664093 100644 --- a/usr.bin/midirecord/midirecord.1 +++ b/usr.bin/midirecord/midirecord.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: midirecord.1,v 1.2 2014/12/30 12:10:07 wiz Exp $ +.\" $NetBSD: midirecord.1,v 1.3 2014/12/30 18:52:47 mrg Exp $ .\" .\" Copyright (c) 1998, 1999, 2001, 2002, 2010 Matthew R. Green .\" All rights reserved. @@ -24,15 +24,15 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 29, 2014 +.Dd December 30, 2014 .Dt MIDIRECORD 1 .Os .Sh NAME -.Nm midiorecord +.Nm midirecord .Nd record midi files .Sh SYNOPSIS .Nm -.Op Fl aDfhqV +.Op Fl aDfhoqV .Op Fl B Ar buffersize .Op Fl c Ar channels .Op Fl d Ar devices @@ -49,6 +49,10 @@ 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 @@ -78,6 +82,9 @@ 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 diff --git a/usr.bin/midirecord/midirecord.c b/usr.bin/midirecord/midirecord.c index 37b052870a42..5bb0ab462d78 100644 --- a/usr.bin/midirecord/midirecord.c +++ b/usr.bin/midirecord/midirecord.c @@ -1,4 +1,4 @@ -/* $NetBSD: midirecord.c,v 1.3 2014/12/30 12:14:34 wiz Exp $ */ +/* $NetBSD: midirecord.c,v 1.4 2014/12/30 18:52:47 mrg Exp $ */ /* * Copyright (c) 2014 Matthew R. Green @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: midirecord.c,v 1.3 2014/12/30 12:14:34 wiz Exp $"); +__RCSID("$NetBSD: midirecord.c,v 1.4 2014/12/30 18:52:47 mrg Exp $"); #endif #include @@ -106,7 +106,7 @@ main(int argc, char *argv[]) size_t bufsize = 0; int ch, no_time_limit = 1; - while ((ch = getopt(argc, argv, "aB:c:Dd:f:hn:qr:t:T:V")) != -1) { + while ((ch = getopt(argc, argv, "aB:c:Dd:f:hn:oqr:t:T:V")) != -1) { switch (ch) { case 'a': aflag++;